Home
last modified time | relevance | path

Searched hist:b59eb961 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/wireless/ath/wil6210/
H A Dcfg80211.cb59eb961 Wed Jan 11 08:32:12 CST 2017 Bhumika Goyal <bhumirks@gmail.com> wil6210: constify cfg80211_ops structures

cfg80211_ops structures are only passed as an argument to the function
wiphy_new. This argument is of type const, so cfg80211_ops strutures
having this property can be declared as const.
Done using Coccinelle

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct cfg80211_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
@@
wiphy_new(&i@p,...)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct cfg80211_ops i;

File size before:
text data bss dec hex filename
18133 6632 0 24765 60bd wireless/ath/wil6210/cfg80211.o

File size after:
text data bss dec hex filename
18933 5832 0 24765 60bd wireless/ath/wil6210/cfg80211.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
b59eb961 Wed Jan 11 08:32:12 CST 2017 Bhumika Goyal <bhumirks@gmail.com> wil6210: constify cfg80211_ops structures

cfg80211_ops structures are only passed as an argument to the function
wiphy_new. This argument is of type const, so cfg80211_ops strutures
having this property can be declared as const.
Done using Coccinelle

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct cfg80211_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
@@
wiphy_new(&i@p,...)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct cfg80211_ops i;

File size before:
text data bss dec hex filename
18133 6632 0 24765 60bd wireless/ath/wil6210/cfg80211.o

File size after:
text data bss dec hex filename
18933 5832 0 24765 60bd wireless/ath/wil6210/cfg80211.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>