scsi: pcmcia: nsp_cs: Remove unnecessary parentheses
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 10 Dec 2018 23:55:40 +0000 (16:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Jan 2019 06:28:49 +0000 (01:28 -0500)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pcmcia/nsp_cs.c

index 1bd6825a4f142680feb0f2d6e2dbeb84fc85feb5..a81748e6e8fb1d33292c3136141e09b671ff0f01 100644 (file)
@@ -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);