]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
scsi: FlashPoint: Remove unnecessary parentheses
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 20 Sep 2018 21:10:32 +0000 (14:10 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 26 Sep 2018 00:45:53 +0000 (20:45 -0400)
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

In file included from drivers/scsi/BusLogic.c:57:
drivers/scsi/FlashPoint.c:2947:34: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
                                if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
                                     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
drivers/scsi/FlashPoint.c:2947:34: note: remove extraneous parentheses around the comparison to silence this warning
                                if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
                                    ~                        ^              ~
drivers/scsi/FlashPoint.c:2947:34: note: use '=' to turn this equality comparison into an assignment
                                if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
                                                             ^~
                                                             =
drivers/scsi/FlashPoint.c:2956:39: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
                                else if ((currSCCB->Sccb_scsistat ==
                                          ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/scsi/FlashPoint.c:2956:39: note: remove extraneous parentheses around the comparison to silence this warning
                                else if ((currSCCB->Sccb_scsistat ==
                                         ~                        ^
drivers/scsi/FlashPoint.c:2956:39: note: use '=' to turn this equality comparison into an assignment
                                else if ((currSCCB->Sccb_scsistat ==
                                                                  ^~
                                                                  =
2 warnings generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/156
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/FlashPoint.c

index 867b864f50479033bd5e206de8bec23cd4a0a81a..0f17bd51088ac7890c94cda8b887b6a7aae3e5e6 100644 (file)
@@ -2944,7 +2944,7 @@ static void FPT_sdecm(unsigned char message, u32 port, unsigned char p_card)
                        }
 
                        if (currSCCB->Lun == 0x00) {
-                               if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
+                               if (currSCCB->Sccb_scsistat == SELECT_SN_ST) {
 
                                        currTar_Info->TarStatus |=
                                            (unsigned char)SYNC_SUPPORTED;
@@ -2953,8 +2953,8 @@ static void FPT_sdecm(unsigned char message, u32 port, unsigned char p_card)
                                            ~EE_SYNC_MASK;
                                }
 
-                               else if ((currSCCB->Sccb_scsistat ==
-                                         SELECT_WN_ST)) {
+                               else if (currSCCB->Sccb_scsistat ==
+                                         SELECT_WN_ST) {
 
                                        currTar_Info->TarStatus =
                                            (currTar_Info->