• 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
..
fusion Loading commit data...
Makefile Loading commit data...