LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH linux-next] r8188eu: remove unneeded conversions to bool
@ 2021-08-24  6:34 CGEL
  2021-08-24  8:00 ` Pavel Skripkin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: CGEL @ 2021-08-24  6:34 UTC (permalink / raw)
  To: Larry Finger
  Cc: Phillip Potter, Greg Kroah-Hartman, Michael Straube,
	linux-staging, linux-kernel, Jing Yangyang, Zeal Robot

From: Jing Yangyang <jing.yangyang@zte.com.cn>

Found with scripts/coccinelle/misc/boolconv.cocci.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 5325fe4..20dc4d4 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -3758,7 +3758,7 @@ int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait
 	u32 start = jiffies;
 
 	do {
-		ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? true : false);
+		ret = _issue_probereq_p2p(adapter, da, wait_ms > 0);
 
 		i++;
 
@@ -4890,7 +4890,7 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
 	u32 start = jiffies;
 
 	do {
-		ret = _issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false);
+		ret = _issue_probereq(padapter, pssid, da, wait_ms > 0);
 
 		i++;
 
@@ -5605,7 +5605,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
 		da = get_my_bssid(&pmlmeinfo->network);
 
 	do {
-		ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0 ? true : false);
+		ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0);
 
 		i++;
 
@@ -5728,7 +5728,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
 		da = get_my_bssid(&pmlmeinfo->network);
 
 	do {
-		ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0 ? true : false);
+		ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0);
 
 		i++;
 
@@ -5839,7 +5839,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
 	u32 start = jiffies;
 
 	do {
-		ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? true : false);
+		ret = _issue_deauth(padapter, da, reason, wait_ms > 0);
 
 		i++;
 
-- 
1.8.3.1



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

* Re: [PATCH linux-next] r8188eu: remove unneeded conversions to bool
  2021-08-24  6:34 [PATCH linux-next] r8188eu: remove unneeded conversions to bool CGEL
@ 2021-08-24  8:00 ` Pavel Skripkin
  2021-08-24 10:40 ` Michael Straube
  2021-08-24 22:02 ` Phillip Potter
  2 siblings, 0 replies; 4+ messages in thread
From: Pavel Skripkin @ 2021-08-24  8:00 UTC (permalink / raw)
  To: CGEL, Larry Finger
  Cc: Phillip Potter, Greg Kroah-Hartman, Michael Straube,
	linux-staging, linux-kernel, Jing Yangyang, Zeal Robot

On 8/24/21 9:34 AM, CGEL wrote:
> From: Jing Yangyang <jing.yangyang@zte.com.cn>
> 
> Found with scripts/coccinelle/misc/boolconv.cocci.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>


Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>


> ---
>   drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 5325fe4..20dc4d4 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -3758,7 +3758,7 @@ int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait
>   	u32 start = jiffies;
>   
>   	do {
> -		ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? true : false);
> +		ret = _issue_probereq_p2p(adapter, da, wait_ms > 0);
>   
>   		i++;
>   
> @@ -4890,7 +4890,7 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
>   	u32 start = jiffies;
>   
>   	do {
> -		ret = _issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false);
> +		ret = _issue_probereq(padapter, pssid, da, wait_ms > 0);
>   
>   		i++;
>   
> @@ -5605,7 +5605,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
>   		da = get_my_bssid(&pmlmeinfo->network);
>   
>   	do {
> -		ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0 ? true : false);
> +		ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0);
>   
>   		i++;
>   
> @@ -5728,7 +5728,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
>   		da = get_my_bssid(&pmlmeinfo->network);
>   
>   	do {
> -		ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0 ? true : false);
> +		ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0);
>   
>   		i++;
>   
> @@ -5839,7 +5839,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
>   	u32 start = jiffies;
>   
>   	do {
> -		ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? true : false);
> +		ret = _issue_deauth(padapter, da, reason, wait_ms > 0);
>   
>   		i++;
>   
> 



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

* Re: [PATCH linux-next] r8188eu: remove unneeded conversions to bool
  2021-08-24  6:34 [PATCH linux-next] r8188eu: remove unneeded conversions to bool CGEL
  2021-08-24  8:00 ` Pavel Skripkin
@ 2021-08-24 10:40 ` Michael Straube
  2021-08-24 22:02 ` Phillip Potter
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2021-08-24 10:40 UTC (permalink / raw)
  To: CGEL, Larry Finger
  Cc: Phillip Potter, Greg Kroah-Hartman, linux-staging, linux-kernel,
	Jing Yangyang, Zeal Robot

On 8/24/21 8:34 AM, CGEL wrote:
> From: Jing Yangyang <jing.yangyang@zte.com.cn>
> 
> Found with scripts/coccinelle/misc/boolconv.cocci.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>

Hi Jing,

thanks for your patch.

Just a minor issue:
Perhaps you could add the patch subject to the changelog message.
I'm not 100% sure if that's a requirement, but common practice
in most cases and nice to have.

Aside from that:

Acked-by: Michael Straube <straube.linux@gmail.com>

Thanks,
Michael

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

* Re: [PATCH linux-next] r8188eu: remove unneeded conversions to bool
  2021-08-24  6:34 [PATCH linux-next] r8188eu: remove unneeded conversions to bool CGEL
  2021-08-24  8:00 ` Pavel Skripkin
  2021-08-24 10:40 ` Michael Straube
@ 2021-08-24 22:02 ` Phillip Potter
  2 siblings, 0 replies; 4+ messages in thread
From: Phillip Potter @ 2021-08-24 22:02 UTC (permalink / raw)
  To: CGEL
  Cc: Larry Finger, Greg Kroah-Hartman, Michael Straube,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List,
	Jing Yangyang, Zeal Robot

On Tue, 24 Aug 2021 at 07:34, CGEL <cgel.zte@gmail.com> wrote:
>
> From: Jing Yangyang <jing.yangyang@zte.com.cn>
>
> Found with scripts/coccinelle/misc/boolconv.cocci.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
> ---
>  drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 5325fe4..20dc4d4 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -3758,7 +3758,7 @@ int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait
>         u32 start = jiffies;
>
>         do {
> -               ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? true : false);
> +               ret = _issue_probereq_p2p(adapter, da, wait_ms > 0);
>
>                 i++;
>
> @@ -4890,7 +4890,7 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
>         u32 start = jiffies;
>
>         do {
> -               ret = _issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false);
> +               ret = _issue_probereq(padapter, pssid, da, wait_ms > 0);
>
>                 i++;
>
> @@ -5605,7 +5605,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
>                 da = get_my_bssid(&pmlmeinfo->network);
>
>         do {
> -               ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0 ? true : false);
> +               ret = _issue_nulldata(padapter, da, power_mode, wait_ms > 0);
>
>                 i++;
>
> @@ -5728,7 +5728,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
>                 da = get_my_bssid(&pmlmeinfo->network);
>
>         do {
> -               ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0 ? true : false);
> +               ret = _issue_qos_nulldata(padapter, da, tid, wait_ms > 0);
>
>                 i++;
>
> @@ -5839,7 +5839,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
>         u32 start = jiffies;
>
>         do {
> -               ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? true : false);
> +               ret = _issue_deauth(padapter, da, reason, wait_ms > 0);
>
>                 i++;
>
> --
> 1.8.3.1
>
>

Not had time to buildest/run this, but it looks ok to me. Many thanks.

Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

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

end of thread, other threads:[~2021-08-24 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  6:34 [PATCH linux-next] r8188eu: remove unneeded conversions to bool CGEL
2021-08-24  8:00 ` Pavel Skripkin
2021-08-24 10:40 ` Michael Straube
2021-08-24 22:02 ` Phillip Potter

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).