Skip to content
Commit 26eb994d authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Kalle Valo
Browse files

libertas: 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
  21225	   1954	     16	  23195	   5a9b	wireless/marvell/libertas/cfg.o

File size after:
   text	   data	    bss	    dec	    hex	filename
  22041	   1154	     16	  23211	   5aab	wireless/marvell/libertas/cfg.o

Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent c93ac39d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment