Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Massive net driver const-ification.

authored by

Arjan van de Ven and committed by
Jeff Garzik
f71e1309 c499ec24

+118 -118
+2 -2
drivers/net/3c59x.c
··· 841 841 XCVR_100baseFx, XCVR_MII=6, XCVR_NWAY=8, XCVR_ExtMII=9, XCVR_Default=10, 842 842 }; 843 843 844 - static struct media_table { 844 + static const struct media_table { 845 845 char *name; 846 846 unsigned int media_bits:16, /* Bits to set in Wn4_Media register. */ 847 847 mask:8, /* The transceiver-present bit in Wn3_Config.*/ ··· 1445 1445 } 1446 1446 1447 1447 { 1448 - static const char * ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 1448 + static const char * const ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 1449 1449 unsigned int config; 1450 1450 EL3WINDOW(3); 1451 1451 vp->available_media = ioread16(ioaddr + Wn3_Options);
+1 -1
drivers/net/8139cp.c
··· 1276 1276 } 1277 1277 #endif /* BROKEN */ 1278 1278 1279 - static char mii_2_8139_map[8] = { 1279 + static const char mii_2_8139_map[8] = { 1280 1280 BasicModeCtrl, 1281 1281 BasicModeStatus, 1282 1282 0,
+2 -2
drivers/net/8139too.c
··· 229 229 230 230 231 231 /* indexed by board_t, above */ 232 - static struct { 232 + static const struct { 233 233 const char *name; 234 234 u32 hw_flags; 235 235 } board_info[] __devinitdata = { ··· 1192 1192 #define mdio_delay() RTL_R8(Config4) 1193 1193 1194 1194 1195 - static char mii_2_8139_map[8] = { 1195 + static const char mii_2_8139_map[8] = { 1196 1196 BasicModeCtrl, 1197 1197 BasicModeStatus, 1198 1198 0,
+5 -5
drivers/net/bnx2.c
··· 46 46 } board_t; 47 47 48 48 /* indexed by board_t, above */ 49 - static struct { 49 + static const struct { 50 50 char *name; 51 51 } board_info[] __devinitdata = { 52 52 { "Broadcom NetXtreme II BCM5706 1000Base-T" }, ··· 3476 3476 { 3477 3477 int ret; 3478 3478 int i; 3479 - static struct { 3479 + static const struct { 3480 3480 u16 offset; 3481 3481 u16 flags; 3482 3482 u32 rw_mask; ··· 3891 3891 static int 3892 3892 bnx2_do_mem_test(struct bnx2 *bp, u32 start, u32 size) 3893 3893 { 3894 - static u32 test_pattern[] = { 0x00000000, 0xffffffff, 0x55555555, 3894 + static const u32 test_pattern[] = { 0x00000000, 0xffffffff, 0x55555555, 3895 3895 0xaaaaaaaa , 0xaa55aa55, 0x55aa55aa }; 3896 3896 int i; 3897 3897 ··· 3916 3916 { 3917 3917 int ret = 0; 3918 3918 int i; 3919 - static struct { 3919 + static const struct { 3920 3920 u32 offset; 3921 3921 u32 len; 3922 3922 } mem_tbl[] = { ··· 5122 5122 5123 5123 #define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, offset_name) / 4) 5124 5124 5125 - static unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = { 5125 + static const unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = { 5126 5126 STATS_OFFSET32(stat_IfHCInOctets_hi), 5127 5127 STATS_OFFSET32(stat_IfHCInBadOctets_hi), 5128 5128 STATS_OFFSET32(stat_IfHCOutOctets_hi),
+42 -42
drivers/net/bnx2_fw.h
··· 14 14 * accompanying it. 15 15 */ 16 16 17 - static int bnx2_COM_b06FwReleaseMajor = 0x1; 18 - static int bnx2_COM_b06FwReleaseMinor = 0x0; 19 - static int bnx2_COM_b06FwReleaseFix = 0x0; 20 - static u32 bnx2_COM_b06FwStartAddr = 0x080008b4; 21 - static u32 bnx2_COM_b06FwTextAddr = 0x08000000; 22 - static int bnx2_COM_b06FwTextLen = 0x57bc; 23 - static u32 bnx2_COM_b06FwDataAddr = 0x08005840; 24 - static int bnx2_COM_b06FwDataLen = 0x0; 25 - static u32 bnx2_COM_b06FwRodataAddr = 0x080057c0; 26 - static int bnx2_COM_b06FwRodataLen = 0x58; 27 - static u32 bnx2_COM_b06FwBssAddr = 0x08005860; 28 - static int bnx2_COM_b06FwBssLen = 0x88; 29 - static u32 bnx2_COM_b06FwSbssAddr = 0x08005840; 30 - static int bnx2_COM_b06FwSbssLen = 0x1c; 17 + static const int bnx2_COM_b06FwReleaseMajor = 0x1; 18 + static const int bnx2_COM_b06FwReleaseMinor = 0x0; 19 + static const int bnx2_COM_b06FwReleaseFix = 0x0; 20 + static const u32 bnx2_COM_b06FwStartAddr = 0x080008b4; 21 + static const u32 bnx2_COM_b06FwTextAddr = 0x08000000; 22 + static const int bnx2_COM_b06FwTextLen = 0x57bc; 23 + static const u32 bnx2_COM_b06FwDataAddr = 0x08005840; 24 + static const int bnx2_COM_b06FwDataLen = 0x0; 25 + static const u32 bnx2_COM_b06FwRodataAddr = 0x080057c0; 26 + static const int bnx2_COM_b06FwRodataLen = 0x58; 27 + static const u32 bnx2_COM_b06FwBssAddr = 0x08005860; 28 + static const int bnx2_COM_b06FwBssLen = 0x88; 29 + static const u32 bnx2_COM_b06FwSbssAddr = 0x08005840; 30 + static const int bnx2_COM_b06FwSbssLen = 0x1c; 31 31 static u32 bnx2_COM_b06FwText[(0x57bc/4) + 1] = { 32 32 0x0a00022d, 0x00000000, 0x00000000, 0x0000000d, 0x636f6d20, 0x322e352e, 33 33 0x38000000, 0x02050802, 0x00000000, 0x00000003, 0x00000014, 0x00000032, ··· 2325 2325 0x0000000c, 0x29520000, 0x00000018, 0x80000002, 0x0000000c, 0x29800000, 2326 2326 0x00000018, 0x00570000 }; 2327 2327 2328 - static int bnx2_TPAT_b06FwReleaseMajor = 0x1; 2329 - static int bnx2_TPAT_b06FwReleaseMinor = 0x0; 2330 - static int bnx2_TPAT_b06FwReleaseFix = 0x0; 2331 - static u32 bnx2_TPAT_b06FwStartAddr = 0x08000860; 2332 - static u32 bnx2_TPAT_b06FwTextAddr = 0x08000800; 2333 - static int bnx2_TPAT_b06FwTextLen = 0x122c; 2334 - static u32 bnx2_TPAT_b06FwDataAddr = 0x08001a60; 2335 - static int bnx2_TPAT_b06FwDataLen = 0x0; 2336 - static u32 bnx2_TPAT_b06FwRodataAddr = 0x00000000; 2337 - static int bnx2_TPAT_b06FwRodataLen = 0x0; 2338 - static u32 bnx2_TPAT_b06FwBssAddr = 0x08001aa0; 2339 - static int bnx2_TPAT_b06FwBssLen = 0x250; 2340 - static u32 bnx2_TPAT_b06FwSbssAddr = 0x08001a60; 2341 - static int bnx2_TPAT_b06FwSbssLen = 0x34; 2328 + static const int bnx2_TPAT_b06FwReleaseMajor = 0x1; 2329 + static const int bnx2_TPAT_b06FwReleaseMinor = 0x0; 2330 + static const int bnx2_TPAT_b06FwReleaseFix = 0x0; 2331 + static const u32 bnx2_TPAT_b06FwStartAddr = 0x08000860; 2332 + static const u32 bnx2_TPAT_b06FwTextAddr = 0x08000800; 2333 + static const int bnx2_TPAT_b06FwTextLen = 0x122c; 2334 + static const u32 bnx2_TPAT_b06FwDataAddr = 0x08001a60; 2335 + static const int bnx2_TPAT_b06FwDataLen = 0x0; 2336 + static const u32 bnx2_TPAT_b06FwRodataAddr = 0x00000000; 2337 + static const int bnx2_TPAT_b06FwRodataLen = 0x0; 2338 + static const u32 bnx2_TPAT_b06FwBssAddr = 0x08001aa0; 2339 + static const int bnx2_TPAT_b06FwBssLen = 0x250; 2340 + static const u32 bnx2_TPAT_b06FwSbssAddr = 0x08001a60; 2341 + static const int bnx2_TPAT_b06FwSbssLen = 0x34; 2342 2342 static u32 bnx2_TPAT_b06FwText[(0x122c/4) + 1] = { 2343 2343 0x0a000218, 0x00000000, 0x00000000, 0x0000000d, 0x74706174, 0x20322e35, 2344 2344 0x2e313100, 0x02050b01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, ··· 2540 2540 static u32 bnx2_TPAT_b06FwBss[(0x250/4) + 1] = { 0x0 }; 2541 2541 static u32 bnx2_TPAT_b06FwSbss[(0x34/4) + 1] = { 0x0 }; 2542 2542 2543 - static int bnx2_TXP_b06FwReleaseMajor = 0x1; 2544 - static int bnx2_TXP_b06FwReleaseMinor = 0x0; 2545 - static int bnx2_TXP_b06FwReleaseFix = 0x0; 2546 - static u32 bnx2_TXP_b06FwStartAddr = 0x080034b0; 2547 - static u32 bnx2_TXP_b06FwTextAddr = 0x08000000; 2548 - static int bnx2_TXP_b06FwTextLen = 0x5748; 2549 - static u32 bnx2_TXP_b06FwDataAddr = 0x08005760; 2550 - static int bnx2_TXP_b06FwDataLen = 0x0; 2551 - static u32 bnx2_TXP_b06FwRodataAddr = 0x00000000; 2552 - static int bnx2_TXP_b06FwRodataLen = 0x0; 2553 - static u32 bnx2_TXP_b06FwBssAddr = 0x080057a0; 2554 - static int bnx2_TXP_b06FwBssLen = 0x1c4; 2555 - static u32 bnx2_TXP_b06FwSbssAddr = 0x08005760; 2556 - static int bnx2_TXP_b06FwSbssLen = 0x38; 2543 + static const int bnx2_TXP_b06FwReleaseMajor = 0x1; 2544 + static const int bnx2_TXP_b06FwReleaseMinor = 0x0; 2545 + static const int bnx2_TXP_b06FwReleaseFix = 0x0; 2546 + static const u32 bnx2_TXP_b06FwStartAddr = 0x080034b0; 2547 + static const u32 bnx2_TXP_b06FwTextAddr = 0x08000000; 2548 + static const int bnx2_TXP_b06FwTextLen = 0x5748; 2549 + static const u32 bnx2_TXP_b06FwDataAddr = 0x08005760; 2550 + static const int bnx2_TXP_b06FwDataLen = 0x0; 2551 + static const u32 bnx2_TXP_b06FwRodataAddr = 0x00000000; 2552 + static const int bnx2_TXP_b06FwRodataLen = 0x0; 2553 + static const u32 bnx2_TXP_b06FwBssAddr = 0x080057a0; 2554 + static const int bnx2_TXP_b06FwBssLen = 0x1c4; 2555 + static const u32 bnx2_TXP_b06FwSbssAddr = 0x08005760; 2556 + static const int bnx2_TXP_b06FwSbssLen = 0x38; 2557 2557 static u32 bnx2_TXP_b06FwText[(0x5748/4) + 1] = { 2558 2558 0x0a000d2c, 0x00000000, 0x00000000, 0x0000000d, 0x74787020, 0x322e352e, 2559 2559 0x38000000, 0x02050800, 0x0000000a, 0x000003e8, 0x0000ea60, 0x00000000,
+1 -1
drivers/net/bonding/bond_alb.c
··· 1261 1261 struct ethhdr *eth_data; 1262 1262 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); 1263 1263 struct slave *tx_slave = NULL; 1264 - static u32 ip_bcast = 0xffffffff; 1264 + static const u32 ip_bcast = 0xffffffff; 1265 1265 int hash_size = 0; 1266 1266 int do_tx_balance = 1; 1267 1267 u32 hash_index = 0;
+1 -1
drivers/net/bonding/bond_main.c
··· 131 131 132 132 /*----------------------------- Global variables ----------------------------*/ 133 133 134 - static const char *version = 134 + static const char * const version = 135 135 DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"; 136 136 137 137 LIST_HEAD(bond_dev_list);
+1 -1
drivers/net/chelsio/subr.c
··· 686 686 */ 687 687 static void __devinit get_pci_mode(adapter_t *adapter, struct chelsio_pci_params *p) 688 688 { 689 - static unsigned short speed_map[] = { 33, 66, 100, 133 }; 689 + static const unsigned short speed_map[] = { 33, 66, 100, 133 }; 690 690 u32 pci_mode; 691 691 692 692 pci_read_config_dword(adapter->pdev, A_PCICFG_MODE, &pci_mode);
+1 -1
drivers/net/dgrs.c
··· 993 993 int is; 994 994 unsigned long i; 995 995 996 - static int iv2is[16] = { 996 + static const int iv2is[16] = { 997 997 0, 0, 0, ES4H_IS_INT3, 998 998 0, ES4H_IS_INT5, 0, ES4H_IS_INT7, 999 999 0, 0, ES4H_IS_INT10, ES4H_IS_INT11,
+2 -2
drivers/net/dgrs_firmware.c
··· 1 - static int dgrs_firmnum = 550; 1 + static const int dgrs_firmnum = 550; 2 2 static char dgrs_firmver[] = "$Version$"; 3 3 static char dgrs_firmdate[] = "11/16/96 03:45:15"; 4 4 static unsigned char dgrs_code[] __initdata = { ··· 9963 9963 109,46,99,0,114,99,0,0,48,120,0,0, 9964 9964 0,0,0,0,0,0,0,0,0,0,0,0 9965 9965 } ; 9966 - static int dgrs_ncode = 119520 ; 9966 + static const int dgrs_ncode = 119520 ;
+2 -2
drivers/net/dl2k.c
··· 90 90 #define EnableInt() \ 91 91 writew(DEFAULT_INTR, ioaddr + IntEnable) 92 92 93 - static int max_intrloop = 50; 94 - static int multicast_filter_limit = 0x40; 93 + static const int max_intrloop = 50; 94 + static const int multicast_filter_limit = 0x40; 95 95 96 96 static int rio_open (struct net_device *dev); 97 97 static void rio_timer (unsigned long data);
+2 -2
drivers/net/eepro100.c
··· 27 27 rx_align support: enables rx DMA without causing unaligned accesses. 28 28 */ 29 29 30 - static const char *version = 30 + static const char * const version = 31 31 "eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html\n" 32 32 "eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n"; 33 33 ··· 469 469 0x31, 0x05, }; 470 470 471 471 /* PHY media interface chips. */ 472 - static const char *phys[] = { 472 + static const char * const phys[] = { 473 473 "None", "i82553-A/B", "i82553-C", "i82503", 474 474 "DP83840", "80c240", "80c24", "i82555", 475 475 "unknown-8", "unknown-9", "DP83840A", "unknown-11",
+2 -2
drivers/net/epic100.c
··· 225 225 226 226 227 227 /* indexed by chip_t */ 228 - static struct epic_chip_info pci_id_tbl[] = { 228 + static const struct epic_chip_info pci_id_tbl[] = { 229 229 { "SMSC EPIC/100 83c170", 230 230 EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, 231 231 { "SMSC EPIC/100 83c170", ··· 291 291 RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull) 292 292 #define EpicNormalEvent (0x0000ffff & ~EpicNapiEvent) 293 293 294 - static u16 media2miictl[16] = { 294 + static const u16 media2miictl[16] = { 295 295 0, 0x0C00, 0x0C00, 0x2000, 0x0100, 0x2100, 0, 0, 296 296 0, 0, 0, 0, 0, 0, 0, 0 }; 297 297
+1 -1
drivers/net/fealnx.c
··· 160 160 int flags; 161 161 }; 162 162 163 - static struct chip_info skel_netdrv_tbl[] = { 163 + static const struct chip_info skel_netdrv_tbl[] = { 164 164 {"100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, 165 165 {"100/10M Ethernet PCI Adapter", 136, HAS_CHIP_XCVR}, 166 166 {"1000/100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR},
+1 -1
drivers/net/hamachi.c
··· 427 427 static void hamachi_timer(unsigned long data); 428 428 429 429 enum capability_flags {CanHaveMII=1, }; 430 - static struct chip_info { 430 + static const struct chip_info { 431 431 u16 vendor_id, device_id, device_id_mask, pad; 432 432 const char *name; 433 433 void (*media_timer)(unsigned long data);
+2 -2
drivers/net/natsemi.c
··· 189 189 190 190 /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). 191 191 This chip uses a 512 element hash table based on the Ethernet CRC. */ 192 - static int multicast_filter_limit = 100; 192 + static const int multicast_filter_limit = 100; 193 193 194 194 /* Set the copy breakpoint for the copy-only-tiny-frames scheme. 195 195 Setting to > 1518 effectively disables this feature. */ ··· 374 374 375 375 376 376 /* array of board data directly indexed by pci_tbl[x].driver_data */ 377 - static struct { 377 + static const struct { 378 378 const char *name; 379 379 unsigned long flags; 380 380 } natsemi_pci_info[] __devinitdata = {
+1 -1
drivers/net/ne2k-pci.c
··· 117 117 }; 118 118 119 119 120 - static struct { 120 + static const struct { 121 121 char *name; 122 122 int flags; 123 123 } pci_clone_list[] __devinitdata = {
+1 -1
drivers/net/ns83820.c
··· 651 651 static void fastcall phy_intr(struct net_device *ndev) 652 652 { 653 653 struct ns83820 *dev = PRIV(ndev); 654 - static char *speeds[] = { "10", "100", "1000", "1000(?)", "1000F" }; 654 + static const char *speeds[] = { "10", "100", "1000", "1000(?)", "1000F" }; 655 655 u32 cfg, new_cfg; 656 656 u32 tbisr, tanar, tanlpar; 657 657 int speed, fullduplex, newlinkstate;
+1 -1
drivers/net/pcmcia/3c574_cs.c
··· 341 341 #define CS_CHECK(fn, ret) \ 342 342 do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 343 343 344 - static char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 344 + static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 345 345 346 346 static void tc574_config(dev_link_t *link) 347 347 {
+1 -1
drivers/net/pcmcia/3c589_cs.c
··· 115 115 spinlock_t lock; 116 116 }; 117 117 118 - static char *if_names[] = { "auto", "10baseT", "10base2", "AUI" }; 118 + static const char *if_names[] = { "auto", "10baseT", "10base2", "AUI" }; 119 119 120 120 /*====================================================================*/ 121 121
+1 -1
drivers/net/pcmcia/fmvj18x_cs.c
··· 309 309 static int mfc_try_io_port(dev_link_t *link) 310 310 { 311 311 int i, ret; 312 - static kio_addr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; 312 + static const kio_addr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; 313 313 314 314 for (i = 0; i < 5; i++) { 315 315 link->io.BasePort2 = serial_base[i];
+1 -1
drivers/net/pcmcia/nmclan_cs.c
··· 388 388 DRV_NAME " " DRV_VERSION " (Roger C. Pao)"; 389 389 #endif 390 390 391 - static char *if_names[]={ 391 + static const char *if_names[]={ 392 392 "Auto", "10baseT", "BNC", 393 393 }; 394 394
+1 -1
drivers/net/pcmcia/pcnet_cs.c
··· 66 66 67 67 #define PCNET_RDC_TIMEOUT (2*HZ/100) /* Max wait in jiffies for Tx RDC */ 68 68 69 - static char *if_names[] = { "auto", "10baseT", "10base2"}; 69 + static const char *if_names[] = { "auto", "10baseT", "10base2"}; 70 70 71 71 #ifdef PCMCIA_DEBUG 72 72 static int pc_debug = PCMCIA_DEBUG;
+2 -2
drivers/net/pcmcia/smc91c92_cs.c
··· 59 59 60 60 /*====================================================================*/ 61 61 62 - static char *if_names[] = { "auto", "10baseT", "10base2"}; 62 + static const char *if_names[] = { "auto", "10baseT", "10base2"}; 63 63 64 64 /* Module parameters */ 65 65 ··· 777 777 static int osi_config(dev_link_t *link) 778 778 { 779 779 struct net_device *dev = link->priv; 780 - static kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; 780 + static const kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; 781 781 int i, j; 782 782 783 783 link->conf.Attributes |= CONF_ENABLE_SPKR;
+1 -1
drivers/net/pcmcia/xirc2ps_cs.c
··· 208 208 #define XIRCREG45_REV 15 /* Revision Register (rd) */ 209 209 #define XIRCREG50_IA 8 /* Individual Address (8-13) */ 210 210 211 - static char *if_names[] = { "Auto", "10BaseT", "10Base2", "AUI", "100BaseT" }; 211 + static const char *if_names[] = { "Auto", "10BaseT", "10Base2", "AUI", "100BaseT" }; 212 212 213 213 /**************** 214 214 * All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
+3 -3
drivers/net/pcnet32.c
··· 26 26 #define DRV_RELDATE "01.Nov.2005" 27 27 #define PFX DRV_NAME ": " 28 28 29 - static const char *version = 29 + static const char * const version = 30 30 DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n"; 31 31 32 32 #include <linux/module.h> ··· 109 109 * table to translate option values from tulip 110 110 * to internal options 111 111 */ 112 - static unsigned char options_mapping[] = { 112 + static const unsigned char options_mapping[] = { 113 113 PCNET32_PORT_ASEL, /* 0 Auto-select */ 114 114 PCNET32_PORT_AUI, /* 1 BNC/AUI */ 115 115 PCNET32_PORT_AUI, /* 2 AUI/BNC */ ··· 733 733 int rc; /* return code */ 734 734 int size; /* size of packets */ 735 735 unsigned char *packet; /* source packet data */ 736 - static int data_len = 60; /* length of source packets */ 736 + static const int data_len = 60; /* length of source packets */ 737 737 unsigned long flags; 738 738 unsigned long ticks; 739 739
+1 -1
drivers/net/phy/phy.c
··· 132 132 }; 133 133 134 134 /* A mapping of all SUPPORTED settings to speed/duplex */ 135 - static struct phy_setting settings[] = { 135 + static const struct phy_setting settings[] = { 136 136 { 137 137 .speed = 10000, 138 138 .duplex = DUPLEX_FULL,
+2 -2
drivers/net/plip.c
··· 123 123 #ifndef NET_DEBUG 124 124 #define NET_DEBUG 1 125 125 #endif 126 - static unsigned int net_debug = NET_DEBUG; 126 + static const unsigned int net_debug = NET_DEBUG; 127 127 128 128 #define ENABLE(irq) if (irq != -1) enable_irq(irq) 129 129 #define DISABLE(irq) if (irq != -1) disable_irq(irq) ··· 351 351 typedef int (*plip_func)(struct net_device *dev, struct net_local *nl, 352 352 struct plip_local *snd, struct plip_local *rcv); 353 353 354 - static plip_func connection_state_table[] = 354 + static const plip_func connection_state_table[] = 355 355 { 356 356 plip_none, 357 357 plip_receive_packet,
+1 -1
drivers/net/ppp_synctty.c
··· 108 108 ppp_print_hex (register __u8 * out, const __u8 * in, int count) 109 109 { 110 110 register __u8 next_ch; 111 - static char hex[] = "0123456789ABCDEF"; 111 + static const char hex[] = "0123456789ABCDEF"; 112 112 113 113 while (count-- > 0) { 114 114 next_ch = *in++;
+2 -2
drivers/net/r8169.c
··· 113 113 static int num_media = 0; 114 114 115 115 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ 116 - static int max_interrupt_work = 20; 116 + static const int max_interrupt_work = 20; 117 117 118 118 /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). 119 119 The RTL chips use a 64 element hash table based on the Ethernet CRC. */ 120 - static int multicast_filter_limit = 32; 120 + static const int multicast_filter_limit = 32; 121 121 122 122 /* MAC address length */ 123 123 #define MAC_ADDR_LEN 6
+4 -4
drivers/net/s2io.c
··· 214 214 #define SWITCH_SIGN 0xA5A5A5A5A5A5A5A5ULL 215 215 #define END_SIGN 0x0 216 216 217 - static u64 herc_act_dtx_cfg[] = { 217 + static const u64 herc_act_dtx_cfg[] = { 218 218 /* Set address */ 219 219 0x8000051536750000ULL, 0x80000515367500E0ULL, 220 220 /* Write data */ ··· 235 235 END_SIGN 236 236 }; 237 237 238 - static u64 xena_mdio_cfg[] = { 238 + static const u64 xena_mdio_cfg[] = { 239 239 /* Reset PMA PLL */ 240 240 0xC001010000000000ULL, 0xC0010100000000E0ULL, 241 241 0xC0010100008000E4ULL, ··· 245 245 END_SIGN 246 246 }; 247 247 248 - static u64 xena_dtx_cfg[] = { 248 + static const u64 xena_dtx_cfg[] = { 249 249 0x8000051500000000ULL, 0x80000515000000E0ULL, 250 250 0x80000515D93500E4ULL, 0x8001051500000000ULL, 251 251 0x80010515000000E0ULL, 0x80010515001E00E4ULL, ··· 273 273 * Constants for Fixing the MacAddress problem seen mostly on 274 274 * Alpha machines. 275 275 */ 276 - static u64 fix_mac[] = { 276 + static const u64 fix_mac[] = { 277 277 0x0060000000000000ULL, 0x0060600000000000ULL, 278 278 0x0040600000000000ULL, 0x0000600000000000ULL, 279 279 0x0020600000000000ULL, 0x0060600000000000ULL,
+1 -1
drivers/net/sb1000.c
··· 59 59 #ifdef SB1000_DEBUG 60 60 static int sb1000_debug = SB1000_DEBUG; 61 61 #else 62 - static int sb1000_debug = 1; 62 + static const int sb1000_debug = 1; 63 63 #endif 64 64 65 65 static const int SB1000_IO_EXTENT = 8;
+1 -1
drivers/net/sis190.c
··· 366 366 * Maximum number of multicast addresses to filter (vs. Rx-all-multicast). 367 367 * The chips use a 64 element hash table based on the Ethernet CRC. 368 368 */ 369 - static int multicast_filter_limit = 32; 369 + static const int multicast_filter_limit = 32; 370 370 371 371 static void __mdio_cmd(void __iomem *ioaddr, u32 ctl) 372 372 {
+4 -4
drivers/net/sis900.c
··· 100 100 SIS_900 = 0, 101 101 SIS_7016 102 102 }; 103 - static char * card_names[] = { 103 + static const char * card_names[] = { 104 104 "SiS 900 PCI Fast Ethernet", 105 105 "SiS 7016 PCI Fast Ethernet" 106 106 }; ··· 115 115 116 116 static void sis900_read_mode(struct net_device *net_dev, int *speed, int *duplex); 117 117 118 - static struct mii_chip_info { 118 + static const struct mii_chip_info { 119 119 const char * name; 120 120 u16 phy_id0; 121 121 u16 phy_id1; ··· 400 400 void *ring_space; 401 401 long ioaddr; 402 402 int i, ret; 403 - char *card_name = card_names[pci_id->driver_data]; 403 + const char *card_name = card_names[pci_id->driver_data]; 404 404 const char *dev_name = pci_name(pci_dev); 405 405 406 406 /* when built into the kernel, we only print version if device is found */ ··· 1275 1275 struct net_device *net_dev = (struct net_device *)data; 1276 1276 struct sis900_private *sis_priv = net_dev->priv; 1277 1277 struct mii_phy *mii_phy = sis_priv->mii; 1278 - static int next_tick = 5*HZ; 1278 + static const int next_tick = 5*HZ; 1279 1279 u16 status; 1280 1280 1281 1281 if (!sis_priv->autong_complete){
+7 -7
drivers/net/skfp/fplustm.c
··· 89 89 /* 90 90 * useful interrupt bits 91 91 */ 92 - static int mac_imsk1u = FM_STXABRS | FM_STXABRA0 | FM_SXMTABT ; 93 - static int mac_imsk1l = FM_SQLCKS | FM_SQLCKA0 | FM_SPCEPDS | FM_SPCEPDA0| 92 + static const int mac_imsk1u = FM_STXABRS | FM_STXABRA0 | FM_SXMTABT ; 93 + static const int mac_imsk1l = FM_SQLCKS | FM_SQLCKA0 | FM_SPCEPDS | FM_SPCEPDA0| 94 94 FM_STBURS | FM_STBURA0 ; 95 95 96 96 /* delete FM_SRBFL after tests */ 97 - static int mac_imsk2u = FM_SERRSF | FM_SNFSLD | FM_SRCVOVR | FM_SRBFL | 97 + static const int mac_imsk2u = FM_SERRSF | FM_SNFSLD | FM_SRCVOVR | FM_SRBFL | 98 98 FM_SMYCLM ; 99 - static int mac_imsk2l = FM_STRTEXR | FM_SDUPCLM | FM_SFRMCTR | 99 + static const int mac_imsk2l = FM_STRTEXR | FM_SDUPCLM | FM_SFRMCTR | 100 100 FM_SERRCTR | FM_SLSTCTR | 101 101 FM_STRTEXP | FM_SMULTDA | FM_SRNGOP ; 102 102 103 - static int mac_imsk3u = FM_SRCVOVR2 | FM_SRBFL2 ; 104 - static int mac_imsk3l = FM_SRPERRQ2 | FM_SRPERRQ1 ; 103 + static const int mac_imsk3u = FM_SRCVOVR2 | FM_SRBFL2 ; 104 + static const int mac_imsk3l = FM_SRPERRQ2 | FM_SRPERRQ1 ; 105 105 106 - static int mac_beacon_imsk2u = FM_SOTRBEC | FM_SMYBEC | FM_SBEC | 106 + static const int mac_beacon_imsk2u = FM_SOTRBEC | FM_SMYBEC | FM_SBEC | 107 107 FM_SLOCLM | FM_SHICLM | FM_SMYCLM | FM_SCLM ; 108 108 109 109
+2 -2
drivers/net/skfp/pcmplc.c
··· 186 186 * Do we need the EBUF error during signaling, too, to detect SUPERNET_3 187 187 * PLL bug? 188 188 */ 189 - static int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 189 + static const int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 190 190 PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR; 191 191 #else /* SUPERNET_3 */ 192 192 /* ··· 195 195 static int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 196 196 PL_PCM_ENABLED | PL_SELF_TEST ; 197 197 #endif /* SUPERNET_3 */ 198 - static int plc_imsk_act = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 198 + static const int plc_imsk_act = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 199 199 PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR; 200 200 201 201 /* external functions */
+1 -1
drivers/net/skfp/skfddi.c
··· 67 67 /* each new release!!! */ 68 68 #define VERSION "2.07" 69 69 70 - static const char *boot_msg = 70 + static const char * const boot_msg = 71 71 "SysKonnect FDDI PCI Adapter driver v" VERSION " for\n" 72 72 " SK-55xx/SK-58xx adapters (SK-NET FDDI-FP/UP/LP)"; 73 73
+2 -2
drivers/net/starfire.c
··· 201 201 static int mtu; 202 202 /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). 203 203 The Starfire has a 512 element hash table based on the Ethernet CRC. */ 204 - static int multicast_filter_limit = 512; 204 + static const int multicast_filter_limit = 512; 205 205 /* Whether to do TCP/UDP checksums in hardware */ 206 206 static int enable_hw_cksum = 1; 207 207 ··· 463 463 MODULE_DEVICE_TABLE(pci, starfire_pci_tbl); 464 464 465 465 /* A chip capabilities table, matching the CH_xxx entries in xxx_pci_tbl[] above. */ 466 - static struct chip_info { 466 + static const struct chip_info { 467 467 const char *name; 468 468 int drv_flags; 469 469 } netdrv_tbl[] __devinitdata = {
+2 -2
drivers/net/sundance.c
··· 106 106 static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ 107 107 /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). 108 108 Typical is a 64 element hash table based on the Ethernet CRC. */ 109 - static int multicast_filter_limit = 32; 109 + static const int multicast_filter_limit = 32; 110 110 111 111 /* Set the copy breakpoint for the copy-only-tiny-frames scheme. 112 112 Setting to > 1518 effectively disables this feature. ··· 298 298 struct pci_id_info { 299 299 const char *name; 300 300 }; 301 - static struct pci_id_info pci_id_tbl[] = { 301 + static const struct pci_id_info pci_id_tbl[] = { 302 302 {"D-Link DFE-550TX FAST Ethernet Adapter"}, 303 303 {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"}, 304 304 {"D-Link DFE-580TX 4 port Server Adapter"},
+1 -1
drivers/net/sungem_phy.c
··· 39 39 #include "sungem_phy.h" 40 40 41 41 /* Link modes of the BCM5400 PHY */ 42 - static int phy_BCM5400_link_table[8][3] = { 42 + static const int phy_BCM5400_link_table[8][3] = { 43 43 { 0, 0, 0 }, /* No link */ 44 44 { 0, 0, 0 }, /* 10BT Half Duplex */ 45 45 { 1, 0, 0 }, /* 10BT Full Duplex */
+2 -2
drivers/net/tg3.c
··· 7785 7785 } 7786 7786 7787 7787 /* Only test the commonly used registers */ 7788 - static int tg3_test_registers(struct tg3 *tp) 7788 + static const int tg3_test_registers(struct tg3 *tp) 7789 7789 { 7790 7790 int i, is_5705; 7791 7791 u32 offset, read_mask, write_mask, val, save_val, read_val; ··· 7999 7999 8000 8000 static int tg3_do_mem_test(struct tg3 *tp, u32 offset, u32 len) 8001 8001 { 8002 - static u32 test_pattern[] = { 0x00000000, 0xffffffff, 0xaa55a55a }; 8002 + static const u32 test_pattern[] = { 0x00000000, 0xffffffff, 0xaa55a55a }; 8003 8003 int i; 8004 8004 u32 j; 8005 8005
+1 -1
drivers/net/typhoon.c
··· 178 178 }; 179 179 180 180 /* directly indexed by enum typhoon_cards, above */ 181 - static struct typhoon_card_info typhoon_card_info[] __devinitdata = { 181 + static const struct typhoon_card_info typhoon_card_info[] __devinitdata = { 182 182 { "3Com Typhoon (3C990-TX)", 183 183 TYPHOON_CRYPTO_NONE}, 184 184 { "3Com Typhoon (3CR990-TX-95)",
+3 -3
drivers/net/yellowfin.c
··· 69 69 static int dma_ctrl = 0x00CAC277; /* Override when loading module! */ 70 70 static int fifo_cfg = 0x0028; 71 71 #else 72 - static int dma_ctrl = 0x004A0263; /* Constrained by errata */ 73 - static int fifo_cfg = 0x0020; /* Bypass external Tx FIFO. */ 72 + static const int dma_ctrl = 0x004A0263; /* Constrained by errata */ 73 + static const int fifo_cfg = 0x0020; /* Bypass external Tx FIFO. */ 74 74 #endif 75 75 76 76 /* Set the copy breakpoint for the copy-only-tiny-frames scheme. ··· 266 266 int drv_flags; /* Driver use, intended as capability flags. */ 267 267 }; 268 268 269 - static struct pci_id_info pci_id_tbl[] = { 269 + static const struct pci_id_info pci_id_tbl[] = { 270 270 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, 271 271 PCI_IOTYPE, YELLOWFIN_SIZE, 272 272 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom},