* [PATCH] staging: vc04_services: Avoid NULL comparison
@ 2019-10-03 17:01 Nachammai Karuppiah
2019-10-03 17:18 ` Stefan Wahren
2019-10-03 21:10 ` [Outreachy kernel] " Julia Lawall
0 siblings, 2 replies; 5+ messages in thread
From: Nachammai Karuppiah @ 2019-10-03 17:01 UTC (permalink / raw)
To: Eric Anholt, Stefan Wahren, Greg Kroah-Hartman
Cc: outreachy-kernel, Nachammai Karuppiah
Remove NULL comparison. Issue found using checkpatch.pl
Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
index 17a4f2c..a2268d5 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
@@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
}
}
- return (service != NULL) ? 0 : -1;
+ return (service) ? 0 : -1;
}
EXPORT_SYMBOL(vchi_service_open);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: vc04_services: Avoid NULL comparison
2019-10-03 17:01 [PATCH] staging: vc04_services: Avoid NULL comparison Nachammai Karuppiah
@ 2019-10-03 17:18 ` Stefan Wahren
2019-10-03 17:41 ` Nachammai Karuppiah
2019-10-03 21:10 ` [Outreachy kernel] " Julia Lawall
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Wahren @ 2019-10-03 17:18 UTC (permalink / raw)
To: Nachammai Karuppiah, Eric Anholt, Greg Kroah-Hartman; +Cc: outreachy-kernel
Hi Nachammai,
Am 03.10.19 um 19:01 schrieb Nachammai Karuppiah:
> Remove NULL comparison. Issue found using checkpatch.pl
>
> Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
> ---
could you please add devel@driverdev.osuosl.org to CC?
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> index 17a4f2c..a2268d5 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> @@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
> }
> }
>
> - return (service != NULL) ? 0 : -1;
> + return (service) ? 0 : -1;
Do you think the braces are still necessary in this case?
Btw a quick find -type f | xargs grep "!= NULL" within the
vc04_services/interface reveals more occurences. Would be nice to fix
them all and for once.
Thanks
Stefan
> }
> EXPORT_SYMBOL(vchi_service_open);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: vc04_services: Avoid NULL comparison
2019-10-03 17:18 ` Stefan Wahren
@ 2019-10-03 17:41 ` Nachammai Karuppiah
0 siblings, 0 replies; 5+ messages in thread
From: Nachammai Karuppiah @ 2019-10-03 17:41 UTC (permalink / raw)
To: Stefan Wahren; +Cc: Eric Anholt, Greg Kroah-Hartman, outreachy-kernel
On Thu, Oct 3, 2019 at 1:19 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>
> Hi Nachammai,
>
> Am 03.10.19 um 19:01 schrieb Nachammai Karuppiah:
> > Remove NULL comparison. Issue found using checkpatch.pl
> >
> > Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
> > ---
> could you please add devel@driverdev.osuosl.org to CC?
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> > index 17a4f2c..a2268d5 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> > @@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
> > }
> > }
> >
> > - return (service != NULL) ? 0 : -1;
> > + return (service) ? 0 : -1;
>
> Do you think the braces are still necessary in this case?
>
> Btw a quick find -type f | xargs grep "!= NULL" within the
> vc04_services/interface reveals more occurences. Would be nice to fix
> them all and for once.
Will get rid of the braces.
Sure, I will remove all NULL comparisons in vc04_services/interface
and update this patch.
Thanks,
Nachammai
>
> Thanks
> Stefan
>
> > }
> > EXPORT_SYMBOL(vchi_service_open);
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vc04_services: Avoid NULL comparison
2019-10-03 17:01 [PATCH] staging: vc04_services: Avoid NULL comparison Nachammai Karuppiah
2019-10-03 17:18 ` Stefan Wahren
@ 2019-10-03 21:10 ` Julia Lawall
2019-10-04 9:38 ` Nachammai Karuppiah
1 sibling, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2019-10-03 21:10 UTC (permalink / raw)
To: Nachammai Karuppiah
Cc: Eric Anholt, Stefan Wahren, Greg Kroah-Hartman, outreachy-kernel
On Thu, 3 Oct 2019, Nachammai Karuppiah wrote:
> Remove NULL comparison. Issue found using checkpatch.pl
>
> Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
> ---
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> index 17a4f2c..a2268d5 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> @@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
> }
> }
>
> - return (service != NULL) ? 0 : -1;
> + return (service) ? 0 : -1;
You don't need the parentheses.
julia
> }
> EXPORT_SYMBOL(vchi_service_open);
>
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1570122078-23942-1-git-send-email-nachukannan%40gmail.com.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vc04_services: Avoid NULL comparison
2019-10-03 21:10 ` [Outreachy kernel] " Julia Lawall
@ 2019-10-04 9:38 ` Nachammai Karuppiah
0 siblings, 0 replies; 5+ messages in thread
From: Nachammai Karuppiah @ 2019-10-04 9:38 UTC (permalink / raw)
To: Julia Lawall
Cc: Eric Anholt, Stefan Wahren, Greg Kroah-Hartman, outreachy-kernel
On Thu, Oct 3, 2019 at 5:10 PM Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
>
> On Thu, 3 Oct 2019, Nachammai Karuppiah wrote:
>
> > Remove NULL comparison. Issue found using checkpatch.pl
> >
> > Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
> > ---
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> > index 17a4f2c..a2268d5 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> > @@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
> > }
> > }
> >
> > - return (service != NULL) ? 0 : -1;
> > + return (service) ? 0 : -1;
>
> You don't need the parentheses.
>
Yes, will remove the parenthesis.
Nachammai
> julia
>
> > }
> > EXPORT_SYMBOL(vchi_service_open);
> >
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1570122078-23942-1-git-send-email-nachukannan%40gmail.com.
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-04 9:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 17:01 [PATCH] staging: vc04_services: Avoid NULL comparison Nachammai Karuppiah
2019-10-03 17:18 ` Stefan Wahren
2019-10-03 17:41 ` Nachammai Karuppiah
2019-10-03 21:10 ` [Outreachy kernel] " Julia Lawall
2019-10-04 9:38 ` Nachammai Karuppiah
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.