• Nathan Chancellor's avatar
    scsi: FlashPoint: Remove unnecessary parentheses · adb11023
    Nathan Chancellor authored
    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/156Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Acked-by: default avatarKhalid Aziz <khalid@gonehiking.org>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    adb11023
FlashPoint.c 193 KB