Commit 8306c952 authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller
Browse files

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: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f840011
...@@ -56,9 +56,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) ...@@ -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++) { for (i = 1; i < qdev->rss_ring_first_cq_id; i++, rx_ring++) {
rx_ring = &qdev->rx_ring[i]; rx_ring = &qdev->rx_ring[i];
cqicb = (struct cqicb *)rx_ring; 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 = cqicb->pkt_delay =
le16_to_cpu(qdev->tx_max_coalesced_frames); cpu_to_le16(qdev->tx_max_coalesced_frames);
cqicb->flags = FLAGS_LI; cqicb->flags = FLAGS_LI;
status = ql_write_cfg(qdev, cqicb, sizeof(cqicb), status = ql_write_cfg(qdev, cqicb, sizeof(cqicb),
CFG_LCQ, rx_ring->cq_id); CFG_LCQ, rx_ring->cq_id);
...@@ -79,9 +79,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) ...@@ -79,9 +79,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
i++) { i++) {
rx_ring = &qdev->rx_ring[i]; rx_ring = &qdev->rx_ring[i];
cqicb = (struct cqicb *)rx_ring; 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 = cqicb->pkt_delay =
le16_to_cpu(qdev->rx_max_coalesced_frames); cpu_to_le16(qdev->rx_max_coalesced_frames);
cqicb->flags = FLAGS_LI; cqicb->flags = FLAGS_LI;
status = ql_write_cfg(qdev, cqicb, sizeof(cqicb), status = ql_write_cfg(qdev, cqicb, sizeof(cqicb),
CFG_LCQ, rx_ring->cq_id); CFG_LCQ, rx_ring->cq_id);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment