• Nathan Chancellor's avatar
    scsi: bfa: Remove unused functions · 6498cbc5
    Nathan Chancellor authored
    Clang warns when a variable is assigned to itself.
    
    drivers/scsi/bfa/bfa_fcbuild.c:199:6: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
            len = len;
            ~~~ ^ ~~~
    drivers/scsi/bfa/bfa_fcbuild.c:838:6: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
            len = len;
            ~~~ ^ ~~~
    drivers/scsi/bfa/bfa_fcbuild.c:917:6: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
            len = len;
            ~~~ ^ ~~~
    drivers/scsi/bfa/bfa_fcbuild.c:981:6: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
            len = len;
            ~~~ ^ ~~~
    drivers/scsi/bfa/bfa_fcbuild.c:1008:6: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
            len = len;
            ~~~ ^ ~~~
    5 warnings generated.
    
    This construct is usually used to avoid unused variable warnings, which
    I assume is the case here. -Wunused-parameter is hidden behind -Wextra
    with GCC 4.6, which is the minimum version to compile the kernel as of
    commit cafa0010 ("Raise the minimum required gcc version to 4.6").
    
    However, upon further inspection, these functions aren't actually used
    anywhere; they're just defined. Rather than just removing the self
    assignments, remove all of this dead code.
    
    Link: https://github.com/ClangBuiltLinux/linux/issues/148Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    6498cbc5
bfa_fcbuild.c 35.4 KB