Skip to contentSkip to conversation

ssb: fix boolreturn.cocci warning

PATCH In review [email protected] 2 participants 2 messages Jan 14, 2022 – Feb 1, 2022 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ssb: fix boolreturn.cocci warning

From: Yang Guang <[email protected]>

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.

---
 include/linux/ssb/ssb_driver_gige.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/ssb/ssb_driver_gige.h +1 -1
index 15ba0df1ee0d..28c145a51e57 100644
@@ -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 */
Signature · 1 line
2.30.2
#1 lore raw
Quoted 7 lines · [email protected] wrote:

From: Yang Guang <[email protected]>

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

Quoted 6 lines

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

Patch applied to wireless-next.git, thanks.

6d3ac94bae21 ssb: fix boolreturn.cocci warning

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

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