staging: vc04_services: Avoid NULL comparison
Subsystems (2)
PATCH 1/1 staging: vc04_services: Avoid NULL comparison
Remove NULL comparison. Issue found using checkpatch.pl
--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +1 -1
@@ -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);
Signature · 1 line
2.7.4
Hi Nachammai,
Am 03.10.19 um 19:01 schrieb Nachammai Karuppiah:
Quoted 4 lines
Remove NULL comparison. Issue found using checkpatch.pl
Signed-off-by Nachammai Karuppiah <[email protected]>---
could you please add [email protected] to CC?
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, · line 631
Quoted 13 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +1
-1@@ -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
Quoted 3 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-0}EXPORT_SYMBOL (vchi_service_open);
Quoted 20 lines · Stefan Wahren
Hi Nachammai,
Am 03.10.19 um 19:01 schrieb Nachammai Karuppiah:
Quoted 4 lines
Remove NULL comparison. Issue found using checkpatch.pl
Signed-off-by Nachammai Karuppiah <[email protected]>---
could you please add [email protected] to CC?
Quoted 11 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-0@@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, } }
Quoted 8 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, · line 631
Quoted 2 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +1
-1-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
Quoted 7 lines
Thanks
StefanQuoted 3 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-0}EXPORT_SYMBOL (vchi_service_open);
Quoted 12 lines · Nachammai Karuppiah
Remove NULL comparison. Issue found using checkpatch.pl
Signed-off-by Nachammai Karuppiah <[email protected]>--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-0
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, · line 631
Quoted 5 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +1
-1@@ -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
Quoted 11 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-1}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 [email protected]. 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.
Quoted 20 lines · Julia Lawall
Quoted 15 lines · Nachammai Karuppiah
Remove NULL comparison. Issue found using checkpatch.pl
Signed-off-by Nachammai Karuppiah <[email protected]>--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-0@@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, } }
Quoted 5 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, · line 631
Quoted 2 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +1
-1-return (service !=NULL ) ?0 :-1 ; +return (service) ?0 :-1 ;You don't need the parentheses.
Yes, will remove the parenthesis.
Nachammai
Quoted 13 lines
julia
Quoted 11 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +0
-1}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 [email protected]. 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.