Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH] rtw88: 8822c: fix boolreturn.cocci warnings
       [not found] ` <20190913173221.cgz7jdi5ggbfummj@48261080c7f1>
@ 2019-09-13 20:29   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-09-13 20:29 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Tzu-En Huang, kbuild-all, Yan-Hsuan Chuang, linux-wireless

kbuild test robot <lkp@intel.com> writes:

> From: kbuild test robot <lkp@intel.com>
>
> 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 <tehuang@realtek.com>
> Signed-off-by: kbuild test robot <lkp@intel.com>
> ---
>
> 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(-)
>
> --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
> @@ -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?

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

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

* Re: [PATCH] rtw88: 8822c: fix boolreturn.cocci warnings
  2019-09-16  2:41 yhchuang
@ 2019-10-01  9:18 ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-10-01  9:18 UTC (permalink / raw)
  To: yhchuang; +Cc: linux-wireless, tehuang

<yhchuang@realtek.com> wrote:

> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> 
> 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")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>

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

0d32f5d93bba rtw88: 8822c: fix boolreturn.cocci warnings

-- 
https://patchwork.kernel.org/patch/11146287/

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


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

* [PATCH] rtw88: 8822c: fix boolreturn.cocci warnings
@ 2019-09-16  2:41 yhchuang
  2019-10-01  9:18 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: yhchuang @ 2019-09-16  2:41 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, tehuang

From: Yan-Hsuan Chuang <yhchuang@realtek.com>

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")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/rtw8822c.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index c2f6cd7..084c18d 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -2603,9 +2603,9 @@ static bool rtw8822c_dpk_coef_iq_check(struct rtw_dev *rtwdev,
 {
 	if (coef_i == 0x1000 || coef_i == 0x0fff ||
 	    coef_q == 0x1000 || coef_q == 0x0fff)
-		return 1;
-	else
-		return 0;
+		return true;
+
+	return false;
 }
 
 static u32 rtw8822c_dpk_coef_transfer(struct rtw_dev *rtwdev)
-- 
2.7.4


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201909140114.9pMJS5nZ%lkp@intel.com>
     [not found] ` <20190913173221.cgz7jdi5ggbfummj@48261080c7f1>
2019-09-13 20:29   ` [PATCH] rtw88: 8822c: fix boolreturn.cocci warnings Kalle Valo
2019-09-16  2:41 yhchuang
2019-10-01  9:18 ` Kalle Valo

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox