Skip to contentSkip to conversation

rtw88: 8822c: fix boolreturn.cocci warnings

PATCH Kalle Valo 1 participant 1 message Sep 13, 2019 2 messages not in the archive

lore
Share & tools
lore

Kalle Valo

author
#2 lore raw
In reply to a message not in the archive
Quoted 23 lines · kbuild test robot

From: kbuild test robot <[email protected]>

drivers/net/wireless/realtek/rtw88/rtw8822c.c:2606:9-10: WARNING: return of 0/1 in function 'rtw8822c_dpk_coef_iq_check' 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

Fixes 5227c2ee453d ("rtw88: 8822c: add SW DPK support")
CC Tzu-En Huang <[email protected]>

---

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
head:   f9e568754562e0f506e12aa899c378b4155080e9
commit: 5227c2ee453d2f778192d8bb0f1a6072892aaa8e [23/32] rtw88: 8822c: add SW DPK support
 rtw8822c.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

drivers/net/wireless/realtek/rtw88/rtw8822c.c static bool rtw8822c_dpk_coef_iq_check(s · line 2608

Quoted 8 lines
drivers/net/wireless/realtek/rtw88/rtw8822c.c +2 -2
@@ -2603,9 +2603,9 @@ static bool rtw8822c_dpk_coef_iq_check(s
 {
 	if (coef_i == 0x1000 || coef_i == 0x0fff ||
 	    coef_q == 0x1000 || coef_q == 0x0fff)
-		return 1;
+		return true;
 	else
-		return 0;
+		return false;

Can someone submit this to linux-wireless so that patchwork can see it, please?

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches