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

scsi: advansys: Remove unnecessary parentheses

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: https://github.com/ClangBuiltLinux/linux/issues/155
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Nathan Chancellor and committed by
Martin K. Petersen
874deb1c fed564f6

+1 -1
+1 -1
drivers/scsi/advansys.c
··· 6448 6448 sdtr_data = 6449 6449 AscCalSDTRData(asc_dvc, ext_msg.xfer_period, 6450 6450 ext_msg.req_ack_offset); 6451 - if ((sdtr_data == 0xFF)) { 6451 + if (sdtr_data == 0xFF) { 6452 6452 6453 6453 q_cntl |= QC_MSG_OUT; 6454 6454 asc_dvc->init_sdtr &= ~target_id;