diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-01-05 18:17:33 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-05 18:17:33 -0800 |
commit | 8306c952a523ad2f87c101427c3ece91176b822c (patch) | |
tree | a753b27960554173faa65603c70e1fa72341d415 /drivers | |
parent | 0f840011f0396dcb97ca82c64fd43f6990a574dd (diff) | |
download | op-kernel-dev-8306c952a523ad2f87c101427c3ece91176b822c.zip op-kernel-dev-8306c952a523ad2f87c101427c3ece91176b822c.tar.gz |
qlge: Fix sparse warnings for byte swapping in qlge_ethool.c
drivers/net/qlge/qlge_ethtool.c:59:23: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:59:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:59:21: expected restricted unsigned short [usertype] irq_delay
drivers/net/qlge/qlge_ethtool.c:59:21: got unsigned short [unsigned] [usertype] <noident>
drivers/net/qlge/qlge_ethtool.c:61:8: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:60:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:60:21: expected restricted unsigned short [usertype] pkt_delay
drivers/net/qlge/qlge_ethtool.c:60:21: got unsigned short [unsigned] [usertype] <noident>
drivers/net/qlge/qlge_ethtool.c:82:23: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:82:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:82:21: expected restricted unsigned short [usertype] irq_delay
drivers/net/qlge/qlge_ethtool.c:82:21: got unsigned short [unsigned] [usertype] <noident>
drivers/net/qlge/qlge_ethtool.c:84:8: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:83:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:83:21: expected restricted unsigned short [usertype] pkt_delay
drivers/net/qlge/qlge_ethtool.c:83:21: got unsigned short [unsigned] [usertype] <noident>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/qlge/qlge_ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index eefb81b..9d922e2 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c @@ -56,9 +56,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) for (i = 1; i < qdev->rss_ring_first_cq_id; i++, rx_ring++) { rx_ring = &qdev->rx_ring[i]; cqicb = (struct cqicb *)rx_ring; - cqicb->irq_delay = le16_to_cpu(qdev->tx_coalesce_usecs); + cqicb->irq_delay = cpu_to_le16(qdev->tx_coalesce_usecs); cqicb->pkt_delay = - le16_to_cpu(qdev->tx_max_coalesced_frames); + cpu_to_le16(qdev->tx_max_coalesced_frames); cqicb->flags = FLAGS_LI; status = ql_write_cfg(qdev, cqicb, sizeof(cqicb), CFG_LCQ, rx_ring->cq_id); @@ -79,9 +79,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) i++) { rx_ring = &qdev->rx_ring[i]; cqicb = (struct cqicb *)rx_ring; - cqicb->irq_delay = le16_to_cpu(qdev->rx_coalesce_usecs); + cqicb->irq_delay = cpu_to_le16(qdev->rx_coalesce_usecs); cqicb->pkt_delay = - le16_to_cpu(qdev->rx_max_coalesced_frames); + cpu_to_le16(qdev->rx_max_coalesced_frames); cqicb->flags = FLAGS_LI; status = ql_write_cfg(qdev, cqicb, sizeof(cqicb), CFG_LCQ, rx_ring->cq_id); |