aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-12-21 05:16:08 -0500
committerJoe Perches <joe@perches.com>2010-12-21 05:16:08 -0500
commitb6bc765067ece933cc3dc7f5e95665a89100b1d5 (patch)
treebbf55c2d80e839eb4c0ab23bcbdd656d14b3f5fe /drivers/net
parent895950c2a6565d9eefda4a38b00fa28537e39fcb (diff)
drivers/net/*.c: Use static const
Using static const generally increases object text and decreases data size. It also generally decreases overall object size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c501.c4
-rw-r--r--drivers/net/3c503.c4
-rw-r--r--drivers/net/3c507.c4
-rw-r--r--drivers/net/3c527.c6
-rw-r--r--drivers/net/at1700.c6
-rw-r--r--drivers/net/bnx2.c46
-rw-r--r--drivers/net/e2100.c2
-rw-r--r--drivers/net/eepro.c9
-rw-r--r--drivers/net/eexpress.c2
-rw-r--r--drivers/net/gianfar.c10
-rw-r--r--drivers/net/hp.c6
-rw-r--r--drivers/net/jme.c4
-rw-r--r--drivers/net/ksz884x.c20
-rw-r--r--drivers/net/ni52.c4
-rw-r--r--drivers/net/ni65.c4
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/smc-ultra.c8
-rw-r--r--drivers/net/wd.c2
19 files changed, 78 insertions, 69 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c
index 1776ab61b05..9e1c03eb97a 100644
--- a/drivers/net/3c501.c
+++ b/drivers/net/3c501.c
@@ -158,8 +158,8 @@ static int mem_start;
158struct net_device * __init el1_probe(int unit) 158struct net_device * __init el1_probe(int unit)
159{ 159{
160 struct net_device *dev = alloc_etherdev(sizeof(struct net_local)); 160 struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
161 static unsigned ports[] = { 0x280, 0x300, 0}; 161 static const unsigned ports[] = { 0x280, 0x300, 0};
162 unsigned *port; 162 const unsigned *port;
163 int err = 0; 163 int err = 0;
164 164
165 if (!dev) 165 if (!dev)
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c
index 4777a1cbcd8..d84f6e8903a 100644
--- a/drivers/net/3c503.c
+++ b/drivers/net/3c503.c
@@ -392,8 +392,8 @@ el2_open(struct net_device *dev)
392 int retval; 392 int retval;
393 393
394 if (dev->irq < 2) { 394 if (dev->irq < 2) {
395 int irqlist[] = {5, 9, 3, 4, 0}; 395 static const int irqlist[] = {5, 9, 3, 4, 0};
396 int *irqp = irqlist; 396 const int *irqp = irqlist;
397 397
398 outb(EGACFR_NORM, E33G_GACFR); /* Enable RAM and interrupts. */ 398 outb(EGACFR_NORM, E33G_GACFR); /* Enable RAM and interrupts. */
399 do { 399 do {
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c
index 475a66d95b3..1e945551c14 100644
--- a/drivers/net/3c507.c
+++ b/drivers/net/3c507.c
@@ -311,8 +311,8 @@ static int mem_start;
311struct net_device * __init el16_probe(int unit) 311struct net_device * __init el16_probe(int unit)
312{ 312{
313 struct net_device *dev = alloc_etherdev(sizeof(struct net_local)); 313 struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
314 static unsigned ports[] = { 0x300, 0x320, 0x340, 0x280, 0}; 314 static const unsigned ports[] = { 0x300, 0x320, 0x340, 0x280, 0};
315 unsigned *port; 315 const unsigned *port;
316 int err = -ENODEV; 316 int err = -ENODEV;
317 317
318 if (!dev) 318 if (!dev)
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c
index 013b7c39666..8c094bae8bf 100644
--- a/drivers/net/3c527.c
+++ b/drivers/net/3c527.c
@@ -317,13 +317,13 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
317 u8 POS; 317 u8 POS;
318 u32 base; 318 u32 base;
319 struct mc32_local *lp = netdev_priv(dev); 319 struct mc32_local *lp = netdev_priv(dev);
320 static u16 mca_io_bases[]={ 320 static const u16 mca_io_bases[] = {
321 0x7280,0x7290, 321 0x7280,0x7290,
322 0x7680,0x7690, 322 0x7680,0x7690,
323 0x7A80,0x7A90, 323 0x7A80,0x7A90,
324 0x7E80,0x7E90 324 0x7E80,0x7E90
325 }; 325 };
326 static u32 mca_mem_bases[]={ 326 static const u32 mca_mem_bases[] = {
327 0x00C0000, 327 0x00C0000,
328 0x00C4000, 328 0x00C4000,
329 0x00C8000, 329 0x00C8000,
@@ -333,7 +333,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
333 0x00D8000, 333 0x00D8000,
334 0x00DC000 334 0x00DC000
335 }; 335 };
336 static char *failures[]={ 336 static const char * const failures[] = {
337 "Processor instruction", 337 "Processor instruction",
338 "Processor data bus", 338 "Processor data bus",
339 "Processor data bus", 339 "Processor data bus",
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index 871b1633f54..f4744fc8976 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -270,9 +270,9 @@ static const struct net_device_ops at1700_netdev_ops = {
270 270
271static int __init at1700_probe1(struct net_device *dev, int ioaddr) 271static int __init at1700_probe1(struct net_device *dev, int ioaddr)
272{ 272{
273 char fmv_irqmap[4] = {3, 7, 10, 15}; 273 static const char fmv_irqmap[4] = {3, 7, 10, 15};
274 char fmv_irqmap_pnp[8] = {3, 4, 5, 7, 9, 10, 11, 15}; 274 static const char fmv_irqmap_pnp[8] = {3, 4, 5, 7, 9, 10, 11, 15};
275 char at1700_irqmap[8] = {3, 4, 5, 9, 10, 11, 14, 15}; 275 static const char at1700_irqmap[8] = {3, 4, 5, 9, 10, 11, 14, 15};
276 unsigned int i, irq, is_fmv18x = 0, is_at1700 = 0; 276 unsigned int i, irq, is_fmv18x = 0, is_at1700 = 0;
277 int slot, ret = -ENODEV; 277 int slot, ret = -ENODEV;
278 struct net_local *lp = netdev_priv(dev); 278 struct net_local *lp = netdev_priv(dev);
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5c811f3fa11..819b55cbd49 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6811,28 +6811,30 @@ bnx2_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *_p)
6811 u32 *p = _p, i, offset; 6811 u32 *p = _p, i, offset;
6812 u8 *orig_p = _p; 6812 u8 *orig_p = _p;
6813 struct bnx2 *bp = netdev_priv(dev); 6813 struct bnx2 *bp = netdev_priv(dev);
6814 u32 reg_boundaries[] = { 0x0000, 0x0098, 0x0400, 0x045c, 6814 static const u32 reg_boundaries[] = {
6815 0x0800, 0x0880, 0x0c00, 0x0c10, 6815 0x0000, 0x0098, 0x0400, 0x045c,
6816 0x0c30, 0x0d08, 0x1000, 0x101c, 6816 0x0800, 0x0880, 0x0c00, 0x0c10,
6817 0x1040, 0x1048, 0x1080, 0x10a4, 6817 0x0c30, 0x0d08, 0x1000, 0x101c,
6818 0x1400, 0x1490, 0x1498, 0x14f0, 6818 0x1040, 0x1048, 0x1080, 0x10a4,
6819 0x1500, 0x155c, 0x1580, 0x15dc, 6819 0x1400, 0x1490, 0x1498, 0x14f0,
6820 0x1600, 0x1658, 0x1680, 0x16d8, 6820 0x1500, 0x155c, 0x1580, 0x15dc,
6821 0x1800, 0x1820, 0x1840, 0x1854, 6821 0x1600, 0x1658, 0x1680, 0x16d8,
6822 0x1880, 0x1894, 0x1900, 0x1984, 6822 0x1800, 0x1820, 0x1840, 0x1854,
6823 0x1c00, 0x1c0c, 0x1c40, 0x1c54, 6823 0x1880, 0x1894, 0x1900, 0x1984,
6824 0x1c80, 0x1c94, 0x1d00, 0x1d84, 6824 0x1c00, 0x1c0c, 0x1c40, 0x1c54,
6825 0x2000, 0x2030, 0x23c0, 0x2400, 6825 0x1c80, 0x1c94, 0x1d00, 0x1d84,
6826 0x2800, 0x2820, 0x2830, 0x2850, 6826 0x2000, 0x2030, 0x23c0, 0x2400,
6827 0x2b40, 0x2c10, 0x2fc0, 0x3058, 6827 0x2800, 0x2820, 0x2830, 0x2850,
6828 0x3c00, 0x3c94, 0x4000, 0x4010, 6828 0x2b40, 0x2c10, 0x2fc0, 0x3058,
6829 0x4080, 0x4090, 0x43c0, 0x4458, 6829 0x3c00, 0x3c94, 0x4000, 0x4010,
6830 0x4c00, 0x4c18, 0x4c40, 0x4c54, 6830 0x4080, 0x4090, 0x43c0, 0x4458,
6831 0x4fc0, 0x5010, 0x53c0, 0x5444, 6831 0x4c00, 0x4c18, 0x4c40, 0x4c54,
6832 0x5c00, 0x5c18, 0x5c80, 0x5c90, 6832 0x4fc0, 0x5010, 0x53c0, 0x5444,
6833 0x5fc0, 0x6000, 0x6400, 0x6428, 6833 0x5c00, 0x5c18, 0x5c80, 0x5c90,
6834 0x6800, 0x6848, 0x684c, 0x6860, 6834 0x5fc0, 0x6000, 0x6400, 0x6428,
6835 0x6888, 0x6910, 0x8000 }; 6835 0x6800, 0x6848, 0x684c, 0x6860,
6836 0x6888, 0x6910, 0x8000
6837 };
6836 6838
6837 regs->version = 0; 6839 regs->version = 0;
6838 6840
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c
index 06e72fbef86..94ec973b2bd 100644
--- a/drivers/net/e2100.c
+++ b/drivers/net/e2100.c
@@ -216,7 +216,7 @@ static int __init e21_probe1(struct net_device *dev, int ioaddr)
216 printk(" %02X", station_addr[i]); 216 printk(" %02X", station_addr[i]);
217 217
218 if (dev->irq < 2) { 218 if (dev->irq < 2) {
219 int irqlist[] = {15, 11, 10, 12, 5, 9, 3, 4}; 219 static const int irqlist[] = {15, 11, 10, 12, 5, 9, 3, 4};
220 for (i = 0; i < ARRAY_SIZE(irqlist); i++) 220 for (i = 0; i < ARRAY_SIZE(irqlist); i++)
221 if (request_irq (irqlist[i], NULL, 0, "bogus", NULL) != -EBUSY) { 221 if (request_irq (irqlist[i], NULL, 0, "bogus", NULL) != -EBUSY) {
222 dev->irq = irqlist[i]; 222 dev->irq = irqlist[i];
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index 9e19fbc2f17..4fa8d2a4aef 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -891,12 +891,13 @@ err:
891 there is non-reboot way to recover if something goes wrong. 891 there is non-reboot way to recover if something goes wrong.
892 */ 892 */
893 893
894static char irqrmap[] = {-1,-1,0,1,-1,2,-1,-1,-1,0,3,4,-1,-1,-1,-1}; 894static const char irqrmap[] = {-1,-1,0,1,-1,2,-1,-1,-1,0,3,4,-1,-1,-1,-1};
895static char irqrmap2[] = {-1,-1,4,0,1,2,-1,3,-1,4,5,6,7,-1,-1,-1}; 895static const char irqrmap2[] = {-1,-1,4,0,1,2,-1,3,-1,4,5,6,7,-1,-1,-1};
896static int eepro_grab_irq(struct net_device *dev) 896static int eepro_grab_irq(struct net_device *dev)
897{ 897{
898 int irqlist[] = { 3, 4, 5, 7, 9, 10, 11, 12, 0 }; 898 static const int irqlist[] = { 3, 4, 5, 7, 9, 10, 11, 12, 0 };
899 int *irqp = irqlist, temp_reg, ioaddr = dev->base_addr; 899 const int *irqp = irqlist;
900 int temp_reg, ioaddr = dev->base_addr;
900 901
901 eepro_sw2bank1(ioaddr); /* be CAREFUL, BANK 1 now */ 902 eepro_sw2bank1(ioaddr); /* be CAREFUL, BANK 1 now */
902 903
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 12c37d26410..48ee51bb9e5 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -1103,7 +1103,7 @@ static int __init eexp_hw_probe(struct net_device *dev, unsigned short ioaddr)
1103 dev->dev_addr[i] = ((unsigned char *)hw_addr)[5-i]; 1103 dev->dev_addr[i] = ((unsigned char *)hw_addr)[5-i];
1104 1104
1105 { 1105 {
1106 static char irqmap[]={0, 9, 3, 4, 5, 10, 11, 0}; 1106 static const char irqmap[] = { 0, 9, 3, 4, 5, 10, 11, 0 };
1107 unsigned short setupval = eexp_hw_readeeprom(ioaddr,0); 1107 unsigned short setupval = eexp_hw_readeeprom(ioaddr,0);
1108 1108
1109 /* Use the IRQ from EEPROM if none was given */ 1109 /* Use the IRQ from EEPROM if none was given */
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index d1bec626917..45c4b7bfcf3 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -143,7 +143,8 @@ void gfar_halt(struct net_device *dev);
143static void gfar_halt_nodisable(struct net_device *dev); 143static void gfar_halt_nodisable(struct net_device *dev);
144void gfar_start(struct net_device *dev); 144void gfar_start(struct net_device *dev);
145static void gfar_clear_exact_match(struct net_device *dev); 145static void gfar_clear_exact_match(struct net_device *dev);
146static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); 146static void gfar_set_mac_for_addr(struct net_device *dev, int num,
147 const u8 *addr);
147static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 148static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
148 149
149MODULE_AUTHOR("Freescale Semiconductor, Inc"); 150MODULE_AUTHOR("Freescale Semiconductor, Inc");
@@ -3094,10 +3095,10 @@ static void gfar_set_multi(struct net_device *dev)
3094static void gfar_clear_exact_match(struct net_device *dev) 3095static void gfar_clear_exact_match(struct net_device *dev)
3095{ 3096{
3096 int idx; 3097 int idx;
3097 u8 zero_arr[MAC_ADDR_LEN] = {0,0,0,0,0,0}; 3098 static const u8 zero_arr[MAC_ADDR_LEN] = {0, 0, 0, 0, 0, 0};
3098 3099
3099 for(idx = 1;idx < GFAR_EM_NUM + 1;idx++) 3100 for(idx = 1;idx < GFAR_EM_NUM + 1;idx++)
3100 gfar_set_mac_for_addr(dev, idx, (u8 *)zero_arr); 3101 gfar_set_mac_for_addr(dev, idx, zero_arr);
3101} 3102}
3102 3103
3103/* Set the appropriate hash bit for the given addr */ 3104/* Set the appropriate hash bit for the given addr */
@@ -3132,7 +3133,8 @@ static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr)
3132/* There are multiple MAC Address register pairs on some controllers 3133/* There are multiple MAC Address register pairs on some controllers
3133 * This function sets the numth pair to a given address 3134 * This function sets the numth pair to a given address
3134 */ 3135 */
3135static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr) 3136static void gfar_set_mac_for_addr(struct net_device *dev, int num,
3137 const u8 *addr)
3136{ 3138{
3137 struct gfar_private *priv = netdev_priv(dev); 3139 struct gfar_private *priv = netdev_priv(dev);
3138 struct gfar __iomem *regs = priv->gfargrp[0].regs; 3140 struct gfar __iomem *regs = priv->gfargrp[0].regs;
diff --git a/drivers/net/hp.c b/drivers/net/hp.c
index d15d2f2ba78..ef2014375e6 100644
--- a/drivers/net/hp.c
+++ b/drivers/net/hp.c
@@ -162,9 +162,9 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr)
162 162
163 /* Snarf the interrupt now. Someday this could be moved to open(). */ 163 /* Snarf the interrupt now. Someday this could be moved to open(). */
164 if (dev->irq < 2) { 164 if (dev->irq < 2) {
165 int irq_16list[] = { 11, 10, 5, 3, 4, 7, 9, 0}; 165 static const int irq_16list[] = { 11, 10, 5, 3, 4, 7, 9, 0};
166 int irq_8list[] = { 7, 5, 3, 4, 9, 0}; 166 static const int irq_8list[] = { 7, 5, 3, 4, 9, 0};
167 int *irqp = wordmode ? irq_16list : irq_8list; 167 const int *irqp = wordmode ? irq_16list : irq_8list;
168 do { 168 do {
169 int irq = *irqp; 169 int irq = *irqp;
170 if (request_irq (irq, NULL, 0, "bogus", NULL) != -EBUSY) { 170 if (request_irq (irq, NULL, 0, "bogus", NULL) != -EBUSY) {
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 2411e72ba57..e97ebef3cf4 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -135,7 +135,7 @@ jme_reset_phy_processor(struct jme_adapter *jme)
135 135
136static void 136static void
137jme_setup_wakeup_frame(struct jme_adapter *jme, 137jme_setup_wakeup_frame(struct jme_adapter *jme,
138 u32 *mask, u32 crc, int fnr) 138 const u32 *mask, u32 crc, int fnr)
139{ 139{
140 int i; 140 int i;
141 141
@@ -163,7 +163,7 @@ jme_setup_wakeup_frame(struct jme_adapter *jme,
163static inline void 163static inline void
164jme_reset_mac_processor(struct jme_adapter *jme) 164jme_reset_mac_processor(struct jme_adapter *jme)
165{ 165{
166 u32 mask[WAKEUP_FRAME_MASK_DWNR] = {0, 0, 0, 0}; 166 static const u32 mask[WAKEUP_FRAME_MASK_DWNR] = {0, 0, 0, 0};
167 u32 crc = 0xCDCDCDCD; 167 u32 crc = 0xCDCDCDCD;
168 u32 gpreg0; 168 u32 gpreg0;
169 int i; 169 int i;
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
index 37504a39890..49ea8708d6d 100644
--- a/drivers/net/ksz884x.c
+++ b/drivers/net/ksz884x.c
@@ -3570,7 +3570,7 @@ static void hw_cfg_wol(struct ksz_hw *hw, u16 frame, int set)
3570 * This routine is used to program Wake-on-LAN pattern. 3570 * This routine is used to program Wake-on-LAN pattern.
3571 */ 3571 */
3572static void hw_set_wol_frame(struct ksz_hw *hw, int i, uint mask_size, 3572static void hw_set_wol_frame(struct ksz_hw *hw, int i, uint mask_size,
3573 u8 *mask, uint frame_size, u8 *pattern) 3573 const u8 *mask, uint frame_size, const u8 *pattern)
3574{ 3574{
3575 int bits; 3575 int bits;
3576 int from; 3576 int from;
@@ -3626,9 +3626,9 @@ static void hw_set_wol_frame(struct ksz_hw *hw, int i, uint mask_size,
3626 * 3626 *
3627 * This routine is used to add ARP pattern for waking up the host. 3627 * This routine is used to add ARP pattern for waking up the host.
3628 */ 3628 */
3629static void hw_add_wol_arp(struct ksz_hw *hw, u8 *ip_addr) 3629static void hw_add_wol_arp(struct ksz_hw *hw, const u8 *ip_addr)
3630{ 3630{
3631 u8 mask[6] = { 0x3F, 0xF0, 0x3F, 0x00, 0xC0, 0x03 }; 3631 static const u8 mask[6] = { 0x3F, 0xF0, 0x3F, 0x00, 0xC0, 0x03 };
3632 u8 pattern[42] = { 3632 u8 pattern[42] = {
3633 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 3633 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
3634 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3634 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3651,8 +3651,8 @@ static void hw_add_wol_arp(struct ksz_hw *hw, u8 *ip_addr)
3651 */ 3651 */
3652static void hw_add_wol_bcast(struct ksz_hw *hw) 3652static void hw_add_wol_bcast(struct ksz_hw *hw)
3653{ 3653{
3654 u8 mask[] = { 0x3F }; 3654 static const u8 mask[] = { 0x3F };
3655 u8 pattern[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 3655 static const u8 pattern[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
3656 3656
3657 hw_set_wol_frame(hw, 2, 1, mask, MAC_ADDR_LEN, pattern); 3657 hw_set_wol_frame(hw, 2, 1, mask, MAC_ADDR_LEN, pattern);
3658} 3658}
@@ -3669,7 +3669,7 @@ static void hw_add_wol_bcast(struct ksz_hw *hw)
3669 */ 3669 */
3670static void hw_add_wol_mcast(struct ksz_hw *hw) 3670static void hw_add_wol_mcast(struct ksz_hw *hw)
3671{ 3671{
3672 u8 mask[] = { 0x3F }; 3672 static const u8 mask[] = { 0x3F };
3673 u8 pattern[] = { 0x33, 0x33, 0xFF, 0x00, 0x00, 0x00 }; 3673 u8 pattern[] = { 0x33, 0x33, 0xFF, 0x00, 0x00, 0x00 };
3674 3674
3675 memcpy(&pattern[3], &hw->override_addr[3], 3); 3675 memcpy(&pattern[3], &hw->override_addr[3], 3);
@@ -3687,7 +3687,7 @@ static void hw_add_wol_mcast(struct ksz_hw *hw)
3687 */ 3687 */
3688static void hw_add_wol_ucast(struct ksz_hw *hw) 3688static void hw_add_wol_ucast(struct ksz_hw *hw)
3689{ 3689{
3690 u8 mask[] = { 0x3F }; 3690 static const u8 mask[] = { 0x3F };
3691 3691
3692 hw_set_wol_frame(hw, 0, 1, mask, MAC_ADDR_LEN, hw->override_addr); 3692 hw_set_wol_frame(hw, 0, 1, mask, MAC_ADDR_LEN, hw->override_addr);
3693} 3693}
@@ -3700,7 +3700,7 @@ static void hw_add_wol_ucast(struct ksz_hw *hw)
3700 * 3700 *
3701 * This routine is used to enable Wake-on-LAN depending on driver settings. 3701 * This routine is used to enable Wake-on-LAN depending on driver settings.
3702 */ 3702 */
3703static void hw_enable_wol(struct ksz_hw *hw, u32 wol_enable, u8 *net_addr) 3703static void hw_enable_wol(struct ksz_hw *hw, u32 wol_enable, const u8 *net_addr)
3704{ 3704{
3705 hw_cfg_wol(hw, KS8841_WOL_MAGIC_ENABLE, (wol_enable & WAKE_MAGIC)); 3705 hw_cfg_wol(hw, KS8841_WOL_MAGIC_ENABLE, (wol_enable & WAKE_MAGIC));
3706 hw_cfg_wol(hw, KS8841_WOL_FRAME0_ENABLE, (wol_enable & WAKE_UCAST)); 3706 hw_cfg_wol(hw, KS8841_WOL_FRAME0_ENABLE, (wol_enable & WAKE_UCAST));
@@ -6208,7 +6208,7 @@ static int netdev_set_wol(struct net_device *dev,
6208 struct dev_info *hw_priv = priv->adapter; 6208 struct dev_info *hw_priv = priv->adapter;
6209 6209
6210 /* Need to find a way to retrieve the device IP address. */ 6210 /* Need to find a way to retrieve the device IP address. */
6211 u8 net_addr[] = { 192, 168, 1, 1 }; 6211 static const u8 net_addr[] = { 192, 168, 1, 1 };
6212 6212
6213 if (wol->wolopts & ~hw_priv->wol_support) 6213 if (wol->wolopts & ~hw_priv->wol_support)
6214 return -EINVAL; 6214 return -EINVAL;
@@ -7241,7 +7241,7 @@ static int pcidev_suspend(struct pci_dev *pdev, pm_message_t state)
7241 struct ksz_hw *hw = &hw_priv->hw; 7241 struct ksz_hw *hw = &hw_priv->hw;
7242 7242
7243 /* Need to find a way to retrieve the device IP address. */ 7243 /* Need to find a way to retrieve the device IP address. */
7244 u8 net_addr[] = { 192, 168, 1, 1 }; 7244 static const u8 net_addr[] = { 192, 168, 1, 1 };
7245 7245
7246 for (i = 0; i < hw->dev_count; i++) { 7246 for (i = 0; i < hw->dev_count; i++) {
7247 if (info->netdev[i]) { 7247 if (info->netdev[i]) {
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c
index 33618edc61f..d973fc6c6b8 100644
--- a/drivers/net/ni52.c
+++ b/drivers/net/ni52.c
@@ -388,9 +388,9 @@ static long memend; /* e.g 0xd4000 */
388struct net_device * __init ni52_probe(int unit) 388struct net_device * __init ni52_probe(int unit)
389{ 389{
390 struct net_device *dev = alloc_etherdev(sizeof(struct priv)); 390 struct net_device *dev = alloc_etherdev(sizeof(struct priv));
391 static int ports[] = {0x300, 0x280, 0x360 , 0x320 , 0x340, 0}; 391 static const int ports[] = {0x300, 0x280, 0x360, 0x320, 0x340, 0};
392 const int *port;
392 struct priv *p; 393 struct priv *p;
393 int *port;
394 int err = 0; 394 int err = 0;
395 395
396 if (!dev) 396 if (!dev)
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c
index da228a0dd6c..c75ae85eb91 100644
--- a/drivers/net/ni65.c
+++ b/drivers/net/ni65.c
@@ -361,8 +361,8 @@ static int dma;
361struct net_device * __init ni65_probe(int unit) 361struct net_device * __init ni65_probe(int unit)
362{ 362{
363 struct net_device *dev = alloc_etherdev(0); 363 struct net_device *dev = alloc_etherdev(0);
364 static int ports[] = {0x360,0x300,0x320,0x340, 0}; 364 static const int ports[] = { 0x360, 0x300, 0x320, 0x340, 0 };
365 int *port; 365 const int *port;
366 int err = 0; 366 int err = 0;
367 367
368 if (!dev) 368 if (!dev)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 4e745af96cf..e165d96ec7d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2526,7 +2526,7 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
2526 2526
2527 val = mdio_read(ioaddr, 0x0d); 2527 val = mdio_read(ioaddr, 0x0d);
2528 if ((val & 0x00ff) != 0x006c) { 2528 if ((val & 0x00ff) != 0x006c) {
2529 u32 set[] = { 2529 static const u32 set[] = {
2530 0x0065, 0x0066, 0x0067, 0x0068, 2530 0x0065, 0x0066, 0x0067, 0x0068,
2531 0x0069, 0x006a, 0x006b, 0x006c 2531 0x0069, 0x006a, 0x006b, 0x006c
2532 }; 2532 };
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 50815fb963f..c149e48a0f5 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -1191,7 +1191,7 @@ static void genesis_init(struct skge_hw *hw)
1191 1191
1192static void genesis_reset(struct skge_hw *hw, int port) 1192static void genesis_reset(struct skge_hw *hw, int port)
1193{ 1193{
1194 const u8 zero[8] = { 0 }; 1194 static const u8 zero[8] = { 0 };
1195 u32 reg; 1195 u32 reg;
1196 1196
1197 skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0); 1197 skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0);
@@ -1557,7 +1557,7 @@ static void genesis_mac_init(struct skge_hw *hw, int port)
1557 int jumbo = hw->dev[port]->mtu > ETH_DATA_LEN; 1557 int jumbo = hw->dev[port]->mtu > ETH_DATA_LEN;
1558 int i; 1558 int i;
1559 u32 r; 1559 u32 r;
1560 const u8 zero[6] = { 0 }; 1560 static const u8 zero[6] = { 0 };
1561 1561
1562 for (i = 0; i < 10; i++) { 1562 for (i = 0; i < 10; i++) {
1563 skge_write16(hw, SK_REG(port, TX_MFF_CTRL1), 1563 skge_write16(hw, SK_REG(port, TX_MFF_CTRL1),
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c
index d2dd8e6113a..235a3c6c9f9 100644
--- a/drivers/net/smc-ultra.c
+++ b/drivers/net/smc-ultra.c
@@ -277,8 +277,12 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
277 dev->base_addr = ioaddr+ULTRA_NIC_OFFSET; 277 dev->base_addr = ioaddr+ULTRA_NIC_OFFSET;
278 278
279 { 279 {
280 int addr_tbl[4] = {0x0C0000, 0x0E0000, 0xFC0000, 0xFE0000}; 280 static const int addr_tbl[4] = {
281 short num_pages_tbl[4] = {0x20, 0x40, 0x80, 0xff}; 281 0x0C0000, 0x0E0000, 0xFC0000, 0xFE0000
282 };
283 static const short num_pages_tbl[4] = {
284 0x20, 0x40, 0x80, 0xff
285 };
282 286
283 dev->mem_start = ((addr & 0x0f) << 13) + addr_tbl[(addr >> 6) & 3] ; 287 dev->mem_start = ((addr & 0x0f) << 13) + addr_tbl[(addr >> 6) & 3] ;
284 num_pages = num_pages_tbl[(addr >> 4) & 3]; 288 num_pages = num_pages_tbl[(addr >> 4) & 3];
diff --git a/drivers/net/wd.c b/drivers/net/wd.c
index f1549fff0ed..8831a3393ec 100644
--- a/drivers/net/wd.c
+++ b/drivers/net/wd.c
@@ -275,7 +275,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
275 dev->base_addr = ioaddr+WD_NIC_OFFSET; 275 dev->base_addr = ioaddr+WD_NIC_OFFSET;
276 276
277 if (dev->irq < 2) { 277 if (dev->irq < 2) {
278 int irqmap[] = {9,3,5,7,10,11,15,4}; 278 static const int irqmap[] = {9, 3, 5, 7, 10, 11, 15, 4};
279 int reg1 = inb(ioaddr+1); 279 int reg1 = inb(ioaddr+1);
280 int reg4 = inb(ioaddr+4); 280 int reg4 = inb(ioaddr+4);
281 if (ancient || reg1 == 0xff) { /* Ack!! No way to read the IRQ! */ 281 if (ancient || reg1 == 0xff) { /* Ack!! No way to read the IRQ! */