• Nathan Chancellor's avatar
    scsi: mptfusion: Remove unnecessary parentheses · 90ded4e2
    Nathan Chancellor authored
    Clang warns when multiple pairs of parentheses are used for a single
    conditional statement.
    
    drivers/message/fusion/mptbase.c:338:11: warning: equality comparison
    with extraneous parentheses [-Wparentheses-equality]
            if ((ioc == NULL))
                 ~~~~^~~~~~~
    drivers/message/fusion/mptbase.c:338:11: note: remove extraneous
    parentheses around the comparison to silence this warning
            if ((ioc == NULL))
                ~    ^      ~
    drivers/message/fusion/mptbase.c:338:11: note: use '=' to turn this
    equality comparison into an assignment
            if ((ioc == NULL))
                     ^~
                     =
    drivers/message/fusion/mptbase.c:342:12: warning: equality comparison
    with extraneous parentheses [-Wparentheses-equality]
            if ((pdev == NULL))
                 ~~~~~^~~~~~~
    drivers/message/fusion/mptbase.c:342:12: note: remove extraneous
    parentheses around the comparison to silence this warning
            if ((pdev == NULL))
                ~     ^      ~
    drivers/message/fusion/mptbase.c:342: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'.
    Reported-by: 's avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Nathan Chancellor's avatarNathan Chancellor <natechancellor@gmail.com>
    Reviewed-by: 's avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Martin K. Petersen's avatarMartin K. Petersen <martin.petersen@oracle.com>
    90ded4e2
Name
Last commit
Last update
..
lsi Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
mptbase.c Loading commit data...
mptbase.h Loading commit data...
mptctl.c Loading commit data...
mptctl.h Loading commit data...
mptdebug.h Loading commit data...
mptfc.c Loading commit data...
mptlan.c Loading commit data...
mptlan.h Loading commit data...
mptsas.c Loading commit data...
mptsas.h Loading commit data...
mptscsih.c Loading commit data...
mptscsih.h Loading commit data...
mptspi.c Loading commit data...