linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ssb: fix boolreturn.cocci warning
@ 2022-01-14  0:11 davidcomponentone
  2022-02-01 12:26 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: davidcomponentone @ 2022-01-14  0:11 UTC (permalink / raw)
  To: m; +Cc: davidcomponentone, linux-wireless, linux-kernel, Yang Guang, Zeal Robot

From: Yang Guang <yang.guang5@zte.com.cn>

The coccinelle report
./include/linux/ssb/ssb_driver_gige.h:98:8-9:
WARNING: return of 0/1 in function
'ssb_gige_must_flush_posted_writes' with return type bool

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
---
 include/linux/ssb/ssb_driver_gige.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
index 15ba0df1ee0d..28c145a51e57 100644
--- a/include/linux/ssb/ssb_driver_gige.h
+++ b/include/linux/ssb/ssb_driver_gige.h
@@ -95,7 +95,7 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
 	struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
 	if (dev)
 		return (dev->dev->bus->chip_id == 0x4785);
-	return 0;
+	return false;
 }
 
 /* Get the device MAC address */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ssb: fix boolreturn.cocci warning
  2022-01-14  0:11 [PATCH] ssb: fix boolreturn.cocci warning davidcomponentone
@ 2022-02-01 12:26 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-02-01 12:26 UTC (permalink / raw)
  To: davidcomponentone
  Cc: m, davidcomponentone, linux-wireless, linux-kernel, Yang Guang,
	Zeal Robot

davidcomponentone@gmail.com wrote:

> From: Yang Guang <yang.guang5@zte.com.cn>
> 
> The coccinelle report
> ./include/linux/ssb/ssb_driver_gige.h:98:8-9:
> WARNING: return of 0/1 in function
> 'ssb_gige_must_flush_posted_writes' with return type bool
> 
> Return statements in functions returning bool should use true/false
> instead of 1/0.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
> Signed-off-by: David Yang <davidcomponentone@gmail.com>

Patch applied to wireless-next.git, thanks.

6d3ac94bae21 ssb: fix boolreturn.cocci warning

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/fa4f1fa737e715eb62a85229ac5f12bae21145cf.1642065490.git.davidcomponentone@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-01 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14  0:11 [PATCH] ssb: fix boolreturn.cocci warning davidcomponentone
2022-02-01 12:26 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).