diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2017-07-18 15:45:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-19 16:33:57 -0700 |
commit | 048578a1954f6c473ba12c9b4519e8dce4a4549b (patch) | |
tree | c4c19018d0acd368a041f2a926c3397221eb7a4c /drivers/net/ethernet/mediatek | |
parent | 648e8b86d0ae01bd5a61df2d776b70ed8b96e2b8 (diff) | |
download | linux-048578a1954f6c473ba12c9b4519e8dce4a4549b.tar.bz2 |
qlcnic: remove unnecessary static in qlcnic_dump_fw()
Remove unnecessary static on local variable fw_dump_ops.
Such variable is initialized before being used, on every
execution path throughout the function. The static has no
benefit and, removing it reduces the object file size.
This issue was detected using Coccinelle and the following semantic patch:
@bad exists@
position p;
identifier x;
type T;
@@
static T x@p;
...
x = <+...x...+>
@@
identifier x;
expression e;
type T;
position p != bad.p;
@@
-static
T x@p;
... when != x
when strict
?x = e;
In the following log you can see a difference in the object file size.
This log is the output of the size command, before and after the code
change:
before:
text data bss dec hex filename
19032 2136 64 21232 52f0 drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.o
after:
text data bss dec hex filename
19020 2048 0 21068 524c drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.o
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek')
0 files changed, 0 insertions, 0 deletions