diff --git a/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c b/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c index 0517968365d74..ba0d1d86ddaaf 100644 --- a/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c +++ b/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c @@ -486,23 +486,23 @@ static void fxgmac_config_multicast_mac_hash_table(struct fxgmac_pdata *pdata, writereg(pdata->pAdapter, regval, pdata->mac_regs + hash_reg); } -static void fxgmac_set_mac_hash_table(struct fxgmac_pdata *pdata) -{ #ifndef DPDK #if FUXI_MAC_HASH_TABLE +static void fxgmac_set_mac_hash_table(struct fxgmac_pdata *pdata) +{ struct net_device *netdev = pdata->netdev; struct netdev_hw_addr *ha; netdev_for_each_mc_addr(ha, netdev) { fxgmac_config_multicast_mac_hash_table(pdata, ha->addr, 1); } -#endif - pdata = pdata; - +} #else - (void)pdata; -#endif +static inline void fxgmac_set_mac_hash_table(void) +{ } +#endif /* FUXI_MAC_HASH_TABLE */ +#endif /* DPDK */ static int fxgmac_add_mac_addresses(struct fxgmac_pdata *pdata) { @@ -608,8 +608,6 @@ static void fxgmac_prepare_tx_stop(struct fxgmac_pdata *pdata, unsigned long tx_timeout; unsigned int tx_status; - pdata = pdata; - /* Calculate the status register to read and the position within */ if (channel->queue_index < DMA_DSRX_FIRST_QUEUE) { tx_dsr = DMA_DSR0; @@ -1318,7 +1316,6 @@ static void fxgmac_tx_desc_init(struct fxgmac_channel *channel) struct fxgmac_desc_data *desc_data; int start_index = ring->cur; unsigned int i; - start_index = start_index; /* Initialize all descriptors */ for (i = 0; i < ring->dma_desc_count; i++) { @@ -1613,9 +1610,8 @@ static void fxgmac_config_rx_fup_enable(struct fxgmac_pdata *pdata) } } -static int fxgmac_config_tx_coalesce(struct fxgmac_pdata *pdata) +static inline int fxgmac_config_tx_coalesce(struct fxgmac_pdata *pdata) { - pdata = pdata; return 0; } @@ -2625,7 +2621,6 @@ static int fxgmac_write_rss_reg(struct fxgmac_pdata *pdata, unsigned int type, unsigned int index, unsigned int val) { int ret = 0; - type = type; writereg(pdata->pAdapter, val, (pdata->base_mem + index)); @@ -5016,7 +5011,6 @@ static int fxgmac_dismiss_DMA_int(struct fxgmac_channel *channel, int int_id) { unsigned int dma_ch_ier; - int_id = int_id; dma_ch_ier = readreg(channel->pdata->pAdapter, FXGMAC_DMA_REG(channel, DMA_CH_SR /*1160*/)); writereg(channel->pdata->pAdapter, dma_ch_ier, diff --git a/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-net.c b/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-net.c index b8734efb36426..0ae527a068388 100644 --- a/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-net.c +++ b/drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-net.c @@ -976,7 +976,7 @@ void fxgmac_free_rx_data(struct fxgmac_pdata *pdata) static int fxgmac_disable_pci_msi_config(struct pci_dev *pdev) { u16 pcie_cap_offset; - u32 pcie_msi_mask_bits; + u32 pcie_msi_mask_bits = 0; int ret = 0; pcie_cap_offset = pci_find_capability(pdev, PCI_CAP_ID_MSI); @@ -1007,7 +1007,7 @@ static int fxgmac_disable_pci_msi_config(struct pci_dev *pdev) static int fxgmac_disable_pci_msix_config(struct pci_dev *pdev) { u16 pcie_cap_offset; - u32 pcie_msi_mask_bits; + u32 pcie_msi_mask_bits = 0; int ret = 0; pcie_cap_offset = pci_find_capability(pdev, PCI_CAP_ID_MSIX);