Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: FlashPoint: Remove unnecessary parentheses

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>

authored by

Nathan Chancellor and committed by
Martin K. Petersen
adb11023 048a864e

+3 -3
+3 -3
drivers/scsi/FlashPoint.c
··· 2944 2944 } 2945 2945 2946 2946 if (currSCCB->Lun == 0x00) { 2947 - if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) { 2947 + if (currSCCB->Sccb_scsistat == SELECT_SN_ST) { 2948 2948 2949 2949 currTar_Info->TarStatus |= 2950 2950 (unsigned char)SYNC_SUPPORTED; ··· 2953 2953 ~EE_SYNC_MASK; 2954 2954 } 2955 2955 2956 - else if ((currSCCB->Sccb_scsistat == 2957 - SELECT_WN_ST)) { 2956 + else if (currSCCB->Sccb_scsistat == 2957 + SELECT_WN_ST) { 2958 2958 2959 2959 currTar_Info->TarStatus = 2960 2960 (currTar_Info->