public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Leonardo Araujo <leonardo.aa88@gmail.com>, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test
Date: Wed, 9 Feb 2022 23:33:22 +0300	[thread overview]
Message-ID: <3448c8bf-a72b-803b-bb50-f5d74340d6db@gmail.com> (raw)
In-Reply-To: <20220209202758.2940-1-leonardo.aa88@gmail.com>

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

  reply	other threads:[~2022-02-09 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 20:27 [PATCH] Staging: r8188eu: core: Comparisons should place the constant on the right side of the test Leonardo Araujo
2022-02-09 20:33 ` Pavel Skripkin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-09 20:20 Leonardo Araujo
2022-02-10  6:54 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3448c8bf-a72b-803b-bb50-f5d74340d6db@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=leonardo.aa88@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox