linux/drivers/net/ethernet/qlogic/qlcnic
Gustavo A. R. Silva 048578a195 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>
2017-07-19 16:33:57 -07:00
..
Makefile
qlcnic_83xx_hw.c qlcnic: Fix tunnel offload for 82xx adapters 2017-06-02 14:30:58 -04:00
qlcnic_83xx_hw.h qlcnic: Fix link configuration with autoneg disabled 2017-05-11 21:39:53 -04:00
qlcnic_83xx_init.c
qlcnic_83xx_vnic.c
qlcnic_ctx.c qlcnic: Fix a memory leak in error handling path 2017-02-20 10:33:38 -05:00
qlcnic_dcb.c
qlcnic_dcb.h
qlcnic_ethtool.c qlcnic: Fix link configuration with autoneg disabled 2017-05-11 21:39:53 -04:00
qlcnic_hdr.h
qlcnic_hw.c qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M 2017-06-01 11:42:19 -04:00
qlcnic_hw.h
qlcnic_init.c
qlcnic_io.c
qlcnic_main.c qlcnic: Fix tunnel offload for 82xx adapters 2017-06-02 14:30:58 -04:00
qlcnic_minidump.c qlcnic: remove unnecessary static in qlcnic_dump_fw() 2017-07-19 16:33:57 -07:00
qlcnic_sriov_common.c qlcnic: Fix tunnel offload for 82xx adapters 2017-06-02 14:30:58 -04:00
qlcnic_sriov_pf.c
qlcnic_sriov.h
qlcnic_sysfs.c qlogic: qlcnic_sysfs: constify bin_attribute structures 2017-02-22 15:39:09 -05:00
qlcnic.h qlcnic: Fix tunnel offload for 82xx adapters 2017-06-02 14:30:58 -04:00