1c40429dfa
Check for cfg80211_ops structures that are only passed as the first argument to the function wiphy_new. As this argument is constant, so cfg80211_ops structures having this property can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct cfg80211_ops i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ wiphy_new(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct cfg80211_ops i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct cfg80211_ops i; File size before: text data bss dec hex filename 17468 2417 14912 34797 87ed drivers/staging/wilc1000/wilc_wfi_cfgoperations.o File size after: text data bss dec hex filename 18204 1681 14912 34797 87ed drivers/staging/wilc1000/wilc_wfi_cfgoperations.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
coreconfigurator.c | ||
coreconfigurator.h | ||
host_interface.c | ||
host_interface.h | ||
Kconfig | ||
linux_mon.c | ||
linux_wlan.c | ||
Makefile | ||
TODO | ||
wilc_debugfs.c | ||
wilc_sdio.c | ||
wilc_spi.c | ||
wilc_wfi_cfgoperations.c | ||
wilc_wfi_cfgoperations.h | ||
wilc_wfi_netdevice.h | ||
wilc_wlan_cfg.c | ||
wilc_wlan_cfg.h | ||
wilc_wlan_if.h | ||
wilc_wlan.c | ||
wilc_wlan.h |