Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[pandora-kernel.git] / drivers / net / e1000 / e1000_param.c
index f8862e2..b9f90a5 100644 (file)
@@ -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) {
@@ -305,7 +304,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                if (num_TxDescriptors > bd) {
                        tx_ring->count = TxDescriptors[bd];
                        e1000_validate_option(&tx_ring->count, &opt, adapter);
-                       E1000_ROUNDUP(tx_ring->count,
+                       tx_ring->count = ALIGN(tx_ring->count,
                                                REQ_TX_DESCRIPTOR_MULTIPLE);
                } else {
                        tx_ring->count = opt.def;
@@ -331,7 +330,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                if (num_RxDescriptors > bd) {
                        rx_ring->count = RxDescriptors[bd];
                        e1000_validate_option(&rx_ring->count, &opt, adapter);
-                       E1000_ROUNDUP(rx_ring->count,
+                       rx_ring->count = ALIGN(rx_ring->count,
                                                REQ_RX_DESCRIPTOR_MULTIPLE);
                } else {
                        rx_ring->count = opt.def;
@@ -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 */