aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic
diff options
context:
space:
mode:
authorSony Chacko <sony.chacko@qlogic.com>2012-11-17 16:04:38 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-18 02:32:16 -0500
commit5ad6ff9d85e1412b9474d3c7cd1c45e4dda862be (patch)
tree88ca656548e719db1aceacec7269475e6fe1e46f /drivers/net/ethernet/qlogic
parent5082dfb71600b4d227c3f0af630c0cd3158e1feb (diff)
qlcnic: fix compiler warnings
Fix the following warnings: qlcnic_main.c: In function 'qlcnic_update_cmd_producer': qlcnic_main.c:119:51: warning: unused parameter 'adapter' [-Wunused-parameter] qlcnic_main.c:119: warning: unused parameter adapter qlcnic_init.c: In function qlcnic_process_lro qlcnic_init.c:1586: warning: unused parameter sds_ring qlcnic_init.c: In function qlcnic_process_rcv_diag qlcnic_init.c:1854: warning: unused parameter sds_ring qlcnic_init.c: In function qlcnic_fetch_mac qlcnic_init.c:1938: warning: unused parameter adapter warning: 'pci_using_dac' may be used uninitialized in this function [-Wmaybe-uninitialized] qlcnic_main.c:1569:10: note: 'pci_using_dac' was declared here Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h5
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c16
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c17
5 files changed, 17 insertions, 25 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index eaa1db9fec32..8b3d3b388735 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -1530,9 +1530,8 @@ int qlcnic_set_features(struct net_device *netdev, netdev_features_t features);
1530int qlcnic_config_hw_lro(struct qlcnic_adapter *adapter, int enable); 1530int qlcnic_config_hw_lro(struct qlcnic_adapter *adapter, int enable);
1531int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable); 1531int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable);
1532int qlcnic_send_lro_cleanup(struct qlcnic_adapter *adapter); 1532int qlcnic_send_lro_cleanup(struct qlcnic_adapter *adapter);
1533void qlcnic_update_cmd_producer(struct qlcnic_adapter *adapter, 1533void qlcnic_update_cmd_producer(struct qlcnic_host_tx_ring *);
1534 struct qlcnic_host_tx_ring *tx_ring); 1534void qlcnic_fetch_mac(u32, u32, u8, u8 *);
1535void qlcnic_fetch_mac(struct qlcnic_adapter *, u32, u32, u8, u8 *);
1536void qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring); 1535void qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring);
1537void qlcnic_clear_lb_mode(struct qlcnic_adapter *adapter); 1536void qlcnic_clear_lb_mode(struct qlcnic_adapter *adapter);
1538int qlcnic_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode); 1537int qlcnic_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index 2a179d087207..bbd3b303360f 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -671,7 +671,7 @@ int qlcnic_get_mac_address(struct qlcnic_adapter *adapter, u8 *mac)
671 err = cmd.rsp.cmd; 671 err = cmd.rsp.cmd;
672 672
673 if (err == QLCNIC_RCODE_SUCCESS) 673 if (err == QLCNIC_RCODE_SUCCESS)
674 qlcnic_fetch_mac(adapter, cmd.rsp.arg1, cmd.rsp.arg2, 0, mac); 674 qlcnic_fetch_mac(cmd.rsp.arg1, cmd.rsp.arg2, 0, mac);
675 else { 675 else {
676 dev_err(&adapter->pdev->dev, 676 dev_err(&adapter->pdev->dev,
677 "Failed to get mac address%d\n", err); 677 "Failed to get mac address%d\n", err);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index 2a0c9dc48eb3..fc308c85c062 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -350,7 +350,7 @@ qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter,
350 350
351 tx_ring->producer = producer; 351 tx_ring->producer = producer;
352 352
353 qlcnic_update_cmd_producer(adapter, tx_ring); 353 qlcnic_update_cmd_producer(tx_ring);
354 354
355 __netif_tx_unlock_bh(tx_ring->txq); 355 __netif_tx_unlock_bh(tx_ring->txq);
356 356
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
index 0bcda9c51e9b..faae9c5fbd10 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
@@ -1583,7 +1583,6 @@ qlcnic_process_rcv(struct qlcnic_adapter *adapter,
1583 1583
1584static struct qlcnic_rx_buffer * 1584static struct qlcnic_rx_buffer *
1585qlcnic_process_lro(struct qlcnic_adapter *adapter, 1585qlcnic_process_lro(struct qlcnic_adapter *adapter,
1586 struct qlcnic_host_sds_ring *sds_ring,
1587 int ring, u64 sts_data0, u64 sts_data1) 1586 int ring, u64 sts_data0, u64 sts_data1)
1588{ 1587{
1589 struct net_device *netdev = adapter->netdev; 1588 struct net_device *netdev = adapter->netdev;
@@ -1698,8 +1697,8 @@ qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int max)
1698 case QLCNIC_LRO_DESC: 1697 case QLCNIC_LRO_DESC:
1699 ring = qlcnic_get_lro_sts_type(sts_data0); 1698 ring = qlcnic_get_lro_sts_type(sts_data0);
1700 sts_data1 = le64_to_cpu(desc->status_desc_data[1]); 1699 sts_data1 = le64_to_cpu(desc->status_desc_data[1]);
1701 rxbuf = qlcnic_process_lro(adapter, sds_ring, 1700 rxbuf = qlcnic_process_lro(adapter, ring, sts_data0,
1702 ring, sts_data0, sts_data1); 1701 sts_data1);
1703 break; 1702 break;
1704 case QLCNIC_RESPONSE_DESC: 1703 case QLCNIC_RESPONSE_DESC:
1705 qlcnic_handle_fw_message(desc_cnt, consumer, sds_ring); 1704 qlcnic_handle_fw_message(desc_cnt, consumer, sds_ring);
@@ -1850,9 +1849,8 @@ static void dump_skb(struct sk_buff *skb, struct qlcnic_adapter *adapter)
1850 } 1849 }
1851} 1850}
1852 1851
1853void qlcnic_process_rcv_diag(struct qlcnic_adapter *adapter, 1852void qlcnic_process_rcv_diag(struct qlcnic_adapter *adapter, int ring,
1854 struct qlcnic_host_sds_ring *sds_ring, 1853 u64 sts_data0)
1855 int ring, u64 sts_data0)
1856{ 1854{
1857 struct qlcnic_recv_context *recv_ctx = adapter->recv_ctx; 1855 struct qlcnic_recv_context *recv_ctx = adapter->recv_ctx;
1858 struct sk_buff *skb; 1856 struct sk_buff *skb;
@@ -1920,7 +1918,7 @@ qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring)
1920 break; 1918 break;
1921 default: 1919 default:
1922 ring = qlcnic_get_sts_type(sts_data0); 1920 ring = qlcnic_get_sts_type(sts_data0);
1923 qlcnic_process_rcv_diag(adapter, sds_ring, ring, sts_data0); 1921 qlcnic_process_rcv_diag(adapter, ring, sts_data0);
1924 break; 1922 break;
1925 } 1923 }
1926 1924
@@ -1934,9 +1932,7 @@ qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring)
1934 writel(consumer, sds_ring->crb_sts_consumer); 1932 writel(consumer, sds_ring->crb_sts_consumer);
1935} 1933}
1936 1934
1937void 1935void qlcnic_fetch_mac(u32 off1, u32 off2, u8 alt_mac, u8 *mac)
1938qlcnic_fetch_mac(struct qlcnic_adapter *adapter, u32 off1, u32 off2,
1939 u8 alt_mac, u8 *mac)
1940{ 1936{
1941 u32 mac_low, mac_high; 1937 u32 mac_low, mac_high;
1942 int i; 1938 int i;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 24ad17ec7fcd..4109a4100552 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -115,9 +115,7 @@ static DEFINE_PCI_DEVICE_TABLE(qlcnic_pci_tbl) = {
115MODULE_DEVICE_TABLE(pci, qlcnic_pci_tbl); 115MODULE_DEVICE_TABLE(pci, qlcnic_pci_tbl);
116 116
117 117
118inline void 118inline void qlcnic_update_cmd_producer(struct qlcnic_host_tx_ring *tx_ring)
119qlcnic_update_cmd_producer(struct qlcnic_adapter *adapter,
120 struct qlcnic_host_tx_ring *tx_ring)
121{ 119{
122 writel(tx_ring->producer, tx_ring->crb_cmd_producer); 120 writel(tx_ring->producer, tx_ring->crb_cmd_producer);
123} 121}
@@ -1485,8 +1483,8 @@ qlcnic_reset_context(struct qlcnic_adapter *adapter)
1485} 1483}
1486 1484
1487static int 1485static int
1488qlcnic_setup_netdev(struct qlcnic_adapter *adapter, 1486qlcnic_setup_netdev(struct qlcnic_adapter *adapter, struct net_device *netdev,
1489 struct net_device *netdev, u8 pci_using_dac) 1487 int pci_using_dac)
1490{ 1488{
1491 int err; 1489 int err;
1492 struct pci_dev *pdev = adapter->pdev; 1490 struct pci_dev *pdev = adapter->pdev;
@@ -1506,7 +1504,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
1506 1504
1507 if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO) 1505 if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO)
1508 netdev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6; 1506 netdev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6;
1509 if (pci_using_dac) 1507 if (pci_using_dac == 1)
1510 netdev->hw_features |= NETIF_F_HIGHDMA; 1508 netdev->hw_features |= NETIF_F_HIGHDMA;
1511 1509
1512 netdev->vlan_features = netdev->hw_features; 1510 netdev->vlan_features = netdev->hw_features;
@@ -1530,7 +1528,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
1530 return 0; 1528 return 0;
1531} 1529}
1532 1530
1533static int qlcnic_set_dma_mask(struct pci_dev *pdev, u8 *pci_using_dac) 1531static int qlcnic_set_dma_mask(struct pci_dev *pdev, int *pci_using_dac)
1534{ 1532{
1535 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && 1533 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
1536 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) 1534 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))
@@ -1564,9 +1562,8 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1564{ 1562{
1565 struct net_device *netdev = NULL; 1563 struct net_device *netdev = NULL;
1566 struct qlcnic_adapter *adapter = NULL; 1564 struct qlcnic_adapter *adapter = NULL;
1567 int err; 1565 int err, pci_using_dac = -1;
1568 uint8_t revision_id; 1566 uint8_t revision_id;
1569 uint8_t pci_using_dac;
1570 char brd_name[QLCNIC_MAX_BOARD_NAME_LEN]; 1567 char brd_name[QLCNIC_MAX_BOARD_NAME_LEN];
1571 1568
1572 err = pci_enable_device(pdev); 1569 err = pci_enable_device(pdev);
@@ -2337,7 +2334,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2337 adapter->stats.txbytes += skb->len; 2334 adapter->stats.txbytes += skb->len;
2338 adapter->stats.xmitcalled++; 2335 adapter->stats.xmitcalled++;
2339 2336
2340 qlcnic_update_cmd_producer(adapter, tx_ring); 2337 qlcnic_update_cmd_producer(tx_ring);
2341 2338
2342 return NETDEV_TX_OK; 2339 return NETDEV_TX_OK;
2343 2340