All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Pinkesh Badjatiya <pinkeshbadjatiya@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Luis de Bethencourt <luisbg@osg.samsung.com>,
	Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>,
	Shivani Bhardwaj <shivanib134@gmail.com>,
	Punit Vara <punitvara@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8712: Fix Comparison with constant warning.
Date: Sat, 6 Feb 2016 08:53:57 -0600	[thread overview]
Message-ID: <56B60905.4090206@lwfinger.net> (raw)
In-Reply-To: <20160206144111.GA86930@ubuntu>

On 02/06/2016 08:41 AM, Pinkesh Badjatiya wrote:
> Fix Comparisons with constant on the left side of the test.
> Checkpatch.pl warning.
> --
> WARNING: Comparisons should place the constant on the right side of the
> test
> 296: FILE: ./rtl8712_cmd.c:296:
> 	while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) &&
>
> Signed-off-by: Pinkesh Badjatiya <pinkeshbadjatiya@gmail.com>
> ---
>   drivers/staging/rtl8712/rtl8712_cmd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

This is another case where the writers of checkpatch are forcing their ideas of 
style on the whole world. The problem is that if I reject your patch, it will be 
submitted by someone else. Thus, reluctantly

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>


>
> diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
> index 9b91609..ce3f7da 100644
> --- a/drivers/staging/rtl8712/rtl8712_cmd.c
> +++ b/drivers/staging/rtl8712/rtl8712_cmd.c
> @@ -293,7 +293,7 @@ u8 r8712_fw_cmd(struct _adapter *pAdapter, u32 cmd)
>
>   	r8712_write32(pAdapter, IOCMD_CTRL_REG, cmd);
>   	msleep(100);
> -	while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) &&
> +	while ((r8712_read32(pAdapter, IOCMD_CTRL_REG) != 0) &&
>   	       (pollingcnts > 0)) {
>   		pollingcnts--;
>   		msleep(20);
>

  reply	other threads:[~2016-02-06 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 14:41 [PATCH] staging: rtl8712: Fix Comparison with constant warning Pinkesh Badjatiya
2016-02-06 14:53 ` Larry Finger [this message]
2016-02-08  3:47   ` Greg Kroah-Hartman
2016-02-08  3:53 ` Greg Kroah-Hartman

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=56B60905.4090206@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luisbg@osg.samsung.com \
    --cc=mahfouz.saif.elyazal@gmail.com \
    --cc=pinkeshbadjatiya@gmail.com \
    --cc=punitvara@gmail.com \
    --cc=shivanib134@gmail.com \
    /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 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.