aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-02-23 04:06:49 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-23 17:11:31 -0500
commit81b504b81437457614ce44ce0dac48038d35f859 (patch)
tree73630dd160a6d5934e4e05e1826e1bf13359a1d1 /drivers
parentc3f52ae6a378398127acb845087ddb9e8b67493b (diff)
atl1[ce]: fix sparse warnings
The dmaw_block is an enum and max_pay_load is u32. Therefore sparse gives warning about comparison of unsigned and signed value. Resolve by using min_t to force cast. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/atl1c/atl1c_main.c4
-rw-r--r--drivers/net/atl1e/atl1e_main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index e60595f0247c..7d9d5067a65c 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -1102,10 +1102,10 @@ static void atl1c_configure_tx(struct atl1c_adapter *adapter)
1102 AT_READ_REG(hw, REG_DEVICE_CTRL, &dev_ctrl_data); 1102 AT_READ_REG(hw, REG_DEVICE_CTRL, &dev_ctrl_data);
1103 max_pay_load = (dev_ctrl_data >> DEVICE_CTRL_MAX_PAYLOAD_SHIFT) & 1103 max_pay_load = (dev_ctrl_data >> DEVICE_CTRL_MAX_PAYLOAD_SHIFT) &
1104 DEVICE_CTRL_MAX_PAYLOAD_MASK; 1104 DEVICE_CTRL_MAX_PAYLOAD_MASK;
1105 hw->dmaw_block = min(max_pay_load, hw->dmaw_block); 1105 hw->dmaw_block = min_t(u32, max_pay_load, hw->dmaw_block);
1106 max_pay_load = (dev_ctrl_data >> DEVICE_CTRL_MAX_RREQ_SZ_SHIFT) & 1106 max_pay_load = (dev_ctrl_data >> DEVICE_CTRL_MAX_RREQ_SZ_SHIFT) &
1107 DEVICE_CTRL_MAX_RREQ_SZ_MASK; 1107 DEVICE_CTRL_MAX_RREQ_SZ_MASK;
1108 hw->dmar_block = min(max_pay_load, hw->dmar_block); 1108 hw->dmar_block = min_t(u32, max_pay_load, hw->dmar_block);
1109 1109
1110 txq_ctrl_data = (hw->tpd_burst & TXQ_NUM_TPD_BURST_MASK) << 1110 txq_ctrl_data = (hw->tpd_burst & TXQ_NUM_TPD_BURST_MASK) <<
1111 TXQ_NUM_TPD_BURST_SHIFT; 1111 TXQ_NUM_TPD_BURST_SHIFT;
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index bf7500ccd73f..21f501184023 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -932,11 +932,11 @@ static inline void atl1e_configure_tx(struct atl1e_adapter *adapter)
932 max_pay_load = ((dev_ctrl_data >> DEVICE_CTRL_MAX_PAYLOAD_SHIFT)) & 932 max_pay_load = ((dev_ctrl_data >> DEVICE_CTRL_MAX_PAYLOAD_SHIFT)) &
933 DEVICE_CTRL_MAX_PAYLOAD_MASK; 933 DEVICE_CTRL_MAX_PAYLOAD_MASK;
934 934
935 hw->dmaw_block = min(max_pay_load, hw->dmaw_block); 935 hw->dmaw_block = min_t(u32, max_pay_load, hw->dmaw_block);
936 936
937 max_pay_load = ((dev_ctrl_data >> DEVICE_CTRL_MAX_RREQ_SZ_SHIFT)) & 937 max_pay_load = ((dev_ctrl_data >> DEVICE_CTRL_MAX_RREQ_SZ_SHIFT)) &
938 DEVICE_CTRL_MAX_RREQ_SZ_MASK; 938 DEVICE_CTRL_MAX_RREQ_SZ_MASK;
939 hw->dmar_block = min(max_pay_load, hw->dmar_block); 939 hw->dmar_block = min_t(u32, max_pay_load, hw->dmar_block);
940 940
941 if (hw->nic_type != athr_l2e_revB) 941 if (hw->nic_type != athr_l2e_revB)
942 AT_WRITE_REGW(hw, REG_TXQ_CTRL + 2, 942 AT_WRITE_REGW(hw, REG_TXQ_CTRL + 2,