]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: bfa: Remove unused functions
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 20 Sep 2018 23:02:12 +0000 (16:02 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Oct 2018 22:21:01 +0000 (18:21 -0400)
commitf7ee14b17e297a66b9fe3bc4b71930d850c02441
tree6d570bf3cedc20cf8414c9202895d7b9ae4e1f47
parent67bc90cdd9dc211e060a96174aacb654abf88a5e
scsi: bfa: Remove unused functions

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 46ed35d9f3fa ("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/148
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/bfa/bfa_fcbuild.c
drivers/scsi/bfa/bfa_fcbuild.h