]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commit6498cbc57f258bc3d079cdae6c22583ce3c174d0
tree6d570bf3cedc20cf8414c9202895d7b9ae4e1f47
parent3e59790e07a94dc3bef541aa044dde36fdb61714
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 cafa0010cd51 ("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