public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pcmcia: Remove unnecessary parentheses
Date: Sat, 26 Jan 2019 12:12:03 -0700	[thread overview]
Message-ID: <20190126191203.GC25003@archlinux-ryzen> (raw)
In-Reply-To: <20181210235540.7039-1-natechancellor@gmail.com>

On Mon, Dec 10, 2018 at 04:55:40PM -0700, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/scsi/pcmcia/nsp_cs.c:1137:27: warning: equality comparison with
> extraneous parentheses [-Wparentheses-equality]
>                 if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) {
>                      ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/pcmcia/nsp_cs.c:1137:27: note: remove extraneous
> parentheses around the comparison to silence this warning
>                 if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) {
>                     ~                   ^                      ~
> drivers/scsi/pcmcia/nsp_cs.c:1137:27: note: use '=' to turn this
> equality comparison into an assignment
>                 if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) {
>                                         ^~
>                                         =
> 1 warning generated.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/scsi/pcmcia/nsp_cs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
> index f3230494a8c9..f28105b144fc 100644
> --- a/drivers/scsi/pcmcia/nsp_cs.c
> +++ b/drivers/scsi/pcmcia/nsp_cs.c
> @@ -1134,7 +1134,8 @@ static irqreturn_t nspintr(int irq, void *dev_id)
>  
>  		//*sync_neg       = SYNC_NOT_YET;
>  
> -		if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) {     /* all command complete and return status */
> +		/* all command complete and return status */
> +		if (tmpSC->SCp.Message == MSG_COMMAND_COMPLETE) {
>  			tmpSC->result = (DID_OK		             << 16) |
>  					((tmpSC->SCp.Message & 0xff) <<  8) |
>  					((tmpSC->SCp.Status  & 0xff) <<  0);
> -- 
> 2.20.0
> 

Ping?

  reply	other threads:[~2019-01-26 19:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 23:55 [PATCH] pcmcia: Remove unnecessary parentheses Nathan Chancellor
2019-01-26 19:12 ` Nathan Chancellor [this message]
2019-01-29  6:29   ` Martin K. Petersen

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=20190126191203.GC25003@archlinux-ryzen \
    --to=natechancellor@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yokota@netlab.is.tsukuba.ac.jp \
    /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