summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
diff options
context:
space:
mode:
authorSony Chacko <sony.chacko@qlogic.com>2012-11-17 21:04:38 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-11-18 07:32:16 (GMT)
commit5ad6ff9d85e1412b9474d3c7cd1c45e4dda862be (patch)
tree88ca656548e719db1aceacec7269475e6fe1e46f /drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
parent5082dfb71600b4d227c3f0af630c0cd3158e1feb (diff)
downloadlinux-fsl-qoriq-5ad6ff9d85e1412b9474d3c7cd1c45e4dda862be.tar.xz
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/qlcnic/qlcnic_main.c')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 24ad17e..4109a41 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) = {
MODULE_DEVICE_TABLE(pci, qlcnic_pci_tbl);
-inline void
-qlcnic_update_cmd_producer(struct qlcnic_adapter *adapter,
- struct qlcnic_host_tx_ring *tx_ring)
+inline void qlcnic_update_cmd_producer(struct qlcnic_host_tx_ring *tx_ring)
{
writel(tx_ring->producer, tx_ring->crb_cmd_producer);
}
@@ -1485,8 +1483,8 @@ qlcnic_reset_context(struct qlcnic_adapter *adapter)
}
static int
-qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
- struct net_device *netdev, u8 pci_using_dac)
+qlcnic_setup_netdev(struct qlcnic_adapter *adapter, struct net_device *netdev,
+ int pci_using_dac)
{
int err;
struct pci_dev *pdev = adapter->pdev;
@@ -1506,7 +1504,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO)
netdev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6;
- if (pci_using_dac)
+ if (pci_using_dac == 1)
netdev->hw_features |= NETIF_F_HIGHDMA;
netdev->vlan_features = netdev->hw_features;
@@ -1530,7 +1528,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
return 0;
}
-static int qlcnic_set_dma_mask(struct pci_dev *pdev, u8 *pci_using_dac)
+static int qlcnic_set_dma_mask(struct pci_dev *pdev, int *pci_using_dac)
{
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
!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)
{
struct net_device *netdev = NULL;
struct qlcnic_adapter *adapter = NULL;
- int err;
+ int err, pci_using_dac = -1;
uint8_t revision_id;
- uint8_t pci_using_dac;
char brd_name[QLCNIC_MAX_BOARD_NAME_LEN];
err = pci_enable_device(pdev);
@@ -2337,7 +2334,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
adapter->stats.txbytes += skb->len;
adapter->stats.xmitcalled++;
- qlcnic_update_cmd_producer(adapter, tx_ring);
+ qlcnic_update_cmd_producer(tx_ring);
return NETDEV_TX_OK;