]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
libertas: Use static const
authorJoe Perches <joe@perches.com>
Sun, 21 Nov 2010 02:38:58 +0000 (18:38 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Nov 2010 20:58:50 +0000 (15:58 -0500)
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
   3650      56     704    4410    113a drivers/net/wireless/libertas/rx.o.new
   3695      56     704    4455    1167 drivers/net/wireless/libertas/rx.o.old
  27328     964    5240   33532    82fc drivers/net/wireless/libertas/cfg.o.new
  27328     964    5240   33532    82fc drivers/net/wireless/libertas/cfg.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/libertas/rx.c

index 73b2beef86b11e0f6df452c4efbb86361e47c738..a90953678b997b3d99b710c1ae267f3202f5b8d3 100644 (file)
@@ -2059,7 +2059,7 @@ static void lbs_cfg_set_regulatory_hint(struct lbs_private *priv)
        };
 
        /* Section 5.17.2 */
-       static struct region_code_mapping regmap[] = {
+       static const struct region_code_mapping regmap[] = {
                {"US ", 0x10}, /* US FCC */
                {"CA ", 0x20}, /* Canada */
                {"EU ", 0x30}, /* ETSI   */
index a4d0bca9ef2c8aeac99f629b955d8056eaaa4c66..a2b1df21d286a60c22d5658d79a1b98e7ea6b97a 100644 (file)
@@ -55,7 +55,9 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
        struct rxpd *p_rx_pd;
        int hdrchop;
        struct ethhdr *p_ethhdr;
-       const u8 rfc1042_eth_hdr[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
+       static const u8 rfc1042_eth_hdr[] = {
+               0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
+       };
 
        lbs_deb_enter(LBS_DEB_RX);