• 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: default avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    90ded4e2
mptbase.c 236 KB