Skip to content

Commit

Permalink
scsi: advansys: Remove unnecessary parentheses
Browse files Browse the repository at this point in the history
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/scsi/advansys.c:6451:20: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]
                                if ((sdtr_data == 0xFF)) {
                                     ~~~~~~~~~~^~~~~~~
drivers/scsi/advansys.c:6451:20: note: remove extraneous parentheses
around the comparison to silence this warning
                                if ((sdtr_data == 0xFF)) {
                                    ~          ^      ~
drivers/scsi/advansys.c:6451:20: note: use '=' to turn this equality
comparison into an assignment
                                if ((sdtr_data == 0xFF)) {
                                               ^~
                                               =
1 warning generated.

Link: ClangBuiltLinux#155
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
nathanchance authored and intel-lab-lkp committed Sep 21, 2018
1 parent 3d1edf3 commit b777f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/advansys.c
Original file line number Diff line number Diff line change
Expand Up @@ -6448,7 +6448,7 @@ static void AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
sdtr_data =
AscCalSDTRData(asc_dvc, ext_msg.xfer_period,
ext_msg.req_ack_offset);
if ((sdtr_data == 0xFF)) {
if (sdtr_data == 0xFF) {

q_cntl |= QC_MSG_OUT;
asc_dvc->init_sdtr &= ~target_id;
Expand Down

0 comments on commit b777f37

Please sign in to comment.