diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-10-29 13:46:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-30 14:32:16 -0400 |
commit | 273dc74e1c7d9aa2eab2036153c8fe65593fb85e (patch) | |
tree | 9f854fce92cea3e9785ed67ced0801a09d3db2d2 /drivers/net/ixgb/ixgb_main.c | |
parent | 5a9147bb29d76b30787638882f6c310074c2e6f3 (diff) |
ixgb: fix sparse warnings
Fix sparse warnings in ixgb driver for net-2.6.24.
Added a sparse fix for invalid declaration using non-constant value
in ixgb_set_multi. Added a fix for the module param array index
and allows int params in the array. --Auke
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index d444de58ba34..e564335b4b84 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -37,8 +37,8 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; | |||
37 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
38 | #endif | 38 | #endif |
39 | #define DRV_VERSION "1.0.126-k2"DRIVERNAPI | 39 | #define DRV_VERSION "1.0.126-k2"DRIVERNAPI |
40 | char ixgb_driver_version[] = DRV_VERSION; | 40 | const char ixgb_driver_version[] = DRV_VERSION; |
41 | static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
42 | 42 | ||
43 | /* ixgb_pci_tbl - PCI Device ID Table | 43 | /* ixgb_pci_tbl - PCI Device ID Table |
44 | * | 44 | * |
@@ -104,7 +104,6 @@ static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter, | |||
104 | static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); | 104 | static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); |
105 | #endif | 105 | #endif |
106 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); | 106 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); |
107 | void ixgb_set_ethtool_ops(struct net_device *netdev); | ||
108 | static void ixgb_tx_timeout(struct net_device *dev); | 107 | static void ixgb_tx_timeout(struct net_device *dev); |
109 | static void ixgb_tx_timeout_task(struct work_struct *work); | 108 | static void ixgb_tx_timeout_task(struct work_struct *work); |
110 | static void ixgb_vlan_rx_register(struct net_device *netdev, | 109 | static void ixgb_vlan_rx_register(struct net_device *netdev, |
@@ -123,9 +122,6 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, | |||
123 | static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); | 122 | static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); |
124 | static void ixgb_io_resume (struct pci_dev *pdev); | 123 | static void ixgb_io_resume (struct pci_dev *pdev); |
125 | 124 | ||
126 | /* Exported from other modules */ | ||
127 | extern void ixgb_check_options(struct ixgb_adapter *adapter); | ||
128 | |||
129 | static struct pci_error_handlers ixgb_err_handler = { | 125 | static struct pci_error_handlers ixgb_err_handler = { |
130 | .error_detected = ixgb_io_error_detected, | 126 | .error_detected = ixgb_io_error_detected, |
131 | .slot_reset = ixgb_io_slot_reset, | 127 | .slot_reset = ixgb_io_slot_reset, |
@@ -1085,7 +1081,8 @@ ixgb_set_multi(struct net_device *netdev) | |||
1085 | rctl |= IXGB_RCTL_MPE; | 1081 | rctl |= IXGB_RCTL_MPE; |
1086 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1082 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1087 | } else { | 1083 | } else { |
1088 | uint8_t mta[netdev->mc_count * IXGB_ETH_LENGTH_OF_ADDRESS]; | 1084 | uint8_t mta[IXGB_MAX_NUM_MULTICAST_ADDRESSES * |
1085 | IXGB_ETH_LENGTH_OF_ADDRESS]; | ||
1089 | 1086 | ||
1090 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1087 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1091 | 1088 | ||