Re: [PATCH] scsi: advansys: Remove unnecessary parentheses

From: Martin K. Petersen
Date: Thu Sep 20 2018 - 23:12:12 EST



Nathan,

> 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.

Applied to 4.20/scsi-queue, thanks!

--
Martin K. Petersen Oracle Linux Engineering