diff mbox series

[linux-next] include:ssb: fix boolreturn.cocci warnings

Message ID 20210824061341.59255-1-deng.changcheng@zte.com.cn (mailing list archive)
State Accepted
Commit 8d4be124062bddbb2bcb887702a0601b790b9a83
Delegated to: Kalle Valo
Headers show
Series [linux-next] include:ssb: fix boolreturn.cocci warnings | expand

Commit Message

CGEL Aug. 24, 2021, 6:13 a.m. UTC
From: Jing Yangyang <jing.yangyang@zte.com.cn>

./include/linux/ssb/ssb_driver_extif.h:200:8-9:WARNING: return of 0/1 in
function 'ssb_extif_available' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 include/linux/ssb/ssb_driver_extif.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Aug. 29, 2021, 11:48 a.m. UTC | #1
CGEL <cgel.zte@gmail.com> wrote:

> From: Jing Yangyang <jing.yangyang@zte.com.cn>
> 
> ./include/linux/ssb/ssb_driver_extif.h:200:8-9:WARNING: return of 0/1 in
> function 'ssb_extif_available' with return type bool
> 
> Return statements in functions returning bool should use true/false
> instead of 1/0.
> 
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>

Patch applied to wireless-drivers-next.git, thanks.

8d4be124062b ssb: fix boolreturn.cocci warning
diff mbox series

Patch

diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h
index 3f8bc97..19253bf 100644
--- a/include/linux/ssb/ssb_driver_extif.h
+++ b/include/linux/ssb/ssb_driver_extif.h
@@ -197,7 +197,7 @@  struct ssb_extif {
 
 static inline bool ssb_extif_available(struct ssb_extif *extif)
 {
-	return 0;
+	return false;
 }
 
 static inline