]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qlge: Fix sparse warnings for byte swapping in qlge_ethool.c
authorRon Mercer <ron.mercer@qlogic.com>
Tue, 6 Jan 2009 02:17:33 +0000 (18:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jan 2009 02:17:33 +0000 (18:17 -0800)
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>
drivers/net/qlge/qlge_ethtool.c

index eefb81b137588d4b61ad94b568f811c4fb5f9382..9d922e2ff226d0753b545870fd9e0348f92fa445 100644 (file)
@@ -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);