diff options
| author | Nathan Chancellor <natechancellor@gmail.com> | 2018-09-20 13:10:02 -0700 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-10 22:07:49 -0400 |
| commit | b51d577a51296fc6967fbab5d857986617c4f276 (patch) | |
| tree | 4be458d3204ee92c32ee5515c2f10ae5fb7f751a /tools/perf/scripts/python | |
| parent | c39a4d755393936d406516e32faf925f167bcfe5 (diff) | |
| download | cachepc-linux-b51d577a51296fc6967fbab5d857986617c4f276.tar.gz cachepc-linux-b51d577a51296fc6967fbab5d857986617c4f276.zip | |
scsi: mpt3sas: Remove unnecessary parentheses and simplify null checks
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.
drivers/scsi/mpt3sas/mpt3sas_base.c:535:11: warning: equality comparison
with extraneous parentheses [-Wparentheses-equality]
if ((ioc == NULL))
~~~~^~~~~~~
drivers/scsi/mpt3sas/mpt3sas_base.c:535:11: note: remove extraneous
parentheses around the comparison to silence this warning
if ((ioc == NULL))
~ ^ ~
drivers/scsi/mpt3sas/mpt3sas_base.c:535:11: note: use '=' to turn this
equality comparison into an assignment
if ((ioc == NULL))
^~
=
drivers/scsi/mpt3sas/mpt3sas_base.c:539:12: warning: equality comparison
with extraneous parentheses [-Wparentheses-equality]
if ((pdev == NULL))
~~~~~^~~~~~~
drivers/scsi/mpt3sas/mpt3sas_base.c:539:12: note: remove extraneous
parentheses around the comparison to silence this warning
if ((pdev == NULL))
~ ^ ~
drivers/scsi/mpt3sas/mpt3sas_base.c:539:12: note: use '=' to turn this
equality comparison into an assignment
if ((pdev == NULL))
^~
=
2 warnings generated.
Remove them and while we're at it, simplify the NULL checks as '!var' is
used more than 'var == NULL'.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
