* [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test
@ 2022-02-09 20:20 Leonardo Araujo
2022-02-10 6:54 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Leonardo Araujo @ 2022-02-09 20:20 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, linux-staging, Leonardo Araujo
This patch fixes the following checkpatch.pl warning:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index c7e8602d2097..a9a5453aa1cc 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -188,7 +188,7 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
cmd_obj->padapter = padapter;
res = rtw_cmd_filter(pcmdpriv, cmd_obj);
- if (_FAIL == res) {
+ if (res == _FAIL) {
rtw_free_cmd_obj(cmd_obj);
goto exit;
}
--
2.29.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test
2022-02-09 20:20 [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test Leonardo Araujo
@ 2022-02-10 6:54 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2022-02-10 6:54 UTC (permalink / raw)
To: Leonardo Araujo; +Cc: linux-kernel, linux-staging
On Wed, Feb 09, 2022 at 05:20:15PM -0300, Leonardo Araujo wrote:
> This patch fixes the following checkpatch.pl warning:
>
> WARNING: Comparisons should place the constant on the right side of the test
>
> Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Also you need to properly cc: the relevant maintainers, as
get_maintainer.pl will show you.
I have dropped all of your pending patches from my queue. Please fix
them up and send a patch series.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test
2022-02-09 20:27 Leonardo Araujo
@ 2022-02-09 20:33 ` Pavel Skripkin
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Skripkin @ 2022-02-09 20:33 UTC (permalink / raw)
To: Leonardo Araujo, gregkh; +Cc: linux-kernel, linux-staging
Hi Leonardo,
On 2/9/22 23:27, Leonardo Araujo wrote:
> This patch fixes the following checkpatch.pl warning:
>
> WARNING: Comparisons should place the constant on the right side of the test
>
> Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index a9a5453aa1cc..e236316188c1 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -618,7 +618,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
> res = rtw_enqueue_cmd(cmdpriv, cmdobj);
> } else {
> /* no need to enqueue, do the cmd hdl directly and free cmd parameter */
> - if (H2C_SUCCESS != disconnect_hdl(padapter, (u8 *)param))
> + if (disconnect_hdl(padapter, (u8 *)param) != H2C_SUCCESS)
Actually disconnect_hdl() always return H2C_SUCCESS. Looks like this
check can be dropped completely
Unfortunately, we can't make it return void, since it's used as part of
wlancmds array :(
With regards,
Pavel Skripkin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test
@ 2022-02-09 20:27 Leonardo Araujo
2022-02-09 20:33 ` Pavel Skripkin
0 siblings, 1 reply; 4+ messages in thread
From: Leonardo Araujo @ 2022-02-09 20:27 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, linux-staging, Leonardo Araujo
This patch fixes the following checkpatch.pl warning:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index a9a5453aa1cc..e236316188c1 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -618,7 +618,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
res = rtw_enqueue_cmd(cmdpriv, cmdobj);
} else {
/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
- if (H2C_SUCCESS != disconnect_hdl(padapter, (u8 *)param))
+ if (disconnect_hdl(padapter, (u8 *)param) != H2C_SUCCESS)
res = _FAIL;
kfree(param);
}
--
2.29.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-10 6:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 20:20 [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test Leonardo Araujo
2022-02-10 6:54 ` Greg KH
2022-02-09 20:27 Leonardo Araujo
2022-02-09 20:33 ` Pavel Skripkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.