X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fe1000%2Fe1000_param.c;h=b9f90a5d3d4d1968f5ed3153b9960a9902cef97b;hb=60ac10658c2e234cf7bc27e0930e324c6c6fcf61;hp=f485874a63f56f6d5b0eaee18e3813cf3aa75c7a;hpb=c6799ade4ae04b53a5f677e5289116155ff01574;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c index f485874a63f..b9f90a5d3d4 100644 --- a/drivers/net/e1000/e1000_param.c +++ b/drivers/net/e1000/e1000_param.c @@ -46,7 +46,7 @@ #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } #define E1000_PARAM(X, desc) \ static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ - static int num_##X = 0; \ + static unsigned int num_##X; \ module_param_array_named(X, X, int, &num_##X, 0); \ MODULE_PARM_DESC(X, desc); @@ -198,9 +198,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); struct e1000_option { enum { enable_option, range_option, list_option } type; - char *name; - char *err; - int def; + const char *name; + const char *err; + int def; union { struct { /* range_option info */ int min; @@ -213,9 +213,9 @@ struct e1000_option { } arg; }; -static int __devinit -e1000_validate_option(int *value, struct e1000_option *opt, - struct e1000_adapter *adapter) +static int __devinit e1000_validate_option(unsigned int *value, + const struct e1000_option *opt, + struct e1000_adapter *adapter) { if (*value == OPTION_UNSET) { *value = opt->def; @@ -277,8 +277,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter); * in a variable in the adapter structure. **/ -void __devinit -e1000_check_options(struct e1000_adapter *adapter) +void __devinit e1000_check_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; if (bd >= E1000_MAX_NIC) { @@ -348,7 +347,7 @@ e1000_check_options(struct e1000_adapter *adapter) }; if (num_XsumRX > bd) { - int rx_csum = XsumRX[bd]; + unsigned int rx_csum = XsumRX[bd]; e1000_validate_option(&rx_csum, &opt, adapter); adapter->rx_csum = rx_csum; } else { @@ -374,7 +373,7 @@ e1000_check_options(struct e1000_adapter *adapter) }; if (num_FlowControl > bd) { - int fc = FlowControl[bd]; + unsigned int fc = FlowControl[bd]; e1000_validate_option(&fc, &opt, adapter); adapter->hw.fc = adapter->hw.original_fc = fc; } else { @@ -506,7 +505,7 @@ e1000_check_options(struct e1000_adapter *adapter) }; if (num_SmartPowerDownEnable > bd) { - int spd = SmartPowerDownEnable[bd]; + unsigned int spd = SmartPowerDownEnable[bd]; e1000_validate_option(&spd, &opt, adapter); adapter->smart_power_down = spd; } else { @@ -522,7 +521,7 @@ e1000_check_options(struct e1000_adapter *adapter) }; if (num_KumeranLockLoss > bd) { - int kmrn_lock_loss = KumeranLockLoss[bd]; + unsigned int kmrn_lock_loss = KumeranLockLoss[bd]; e1000_validate_option(&kmrn_lock_loss, &opt, adapter); adapter->hw.kmrn_lock_loss_workaround_disabled = !kmrn_lock_loss; } else { @@ -550,8 +549,7 @@ e1000_check_options(struct e1000_adapter *adapter) * Handles speed and duplex options on fiber adapters **/ -static void __devinit -e1000_check_fiber_options(struct e1000_adapter *adapter) +static void __devinit e1000_check_fiber_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; if (num_Speed > bd) { @@ -578,10 +576,9 @@ e1000_check_fiber_options(struct e1000_adapter *adapter) * Handles speed and duplex options on copper adapters **/ -static void __devinit -e1000_check_copper_options(struct e1000_adapter *adapter) +static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter) { - int speed, dplx, an; + unsigned int speed, dplx, an; int bd = adapter->bd_number; { /* Speed */