From: Joao Pinto <joao.pi...@synopsys.com> Date: Mon, 13 Mar 2017 16:12:40 +0000
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index e60e077..44db2e3 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -1732,6 +1732,10 @@ static void stmmac_check_ether_addr(struct stmmac_priv > *priv) > */ > static int stmmac_init_dma_engine(struct stmmac_priv *priv) > { > + u32 rx_channels_count = priv->plat->rx_queues_to_use; > + u32 tx_channels_count = priv->plat->tx_queues_to_use; > + u32 dummy_dma_rx_phy, dummy_dma_tx_phy = 0; > + u32 chan = 0; > int atds = 0; > int ret = 0; > dummy_dma_rx_phy is declared, but not initialized: > @@ -1749,19 +1753,43 @@ static int stmmac_init_dma_engine(struct stmmac_priv > *priv) > return ret; > } > > - priv->hw->dma->init(priv->ioaddr, priv->plat->dma_cfg, > - priv->dma_tx_phy, priv->dma_rx_phy, atds); > - > if (priv->synopsys_id >= DWMAC_CORE_4_00) { > - priv->rx_tail_addr = priv->dma_rx_phy + > - (DMA_RX_SIZE * sizeof(struct dma_desc)); > - priv->hw->dma->set_rx_tail_ptr(priv->ioaddr, priv->rx_tail_addr, > - STMMAC_CHAN0); > + /* DMA Configuration */ > + priv->hw->dma->init(priv->ioaddr, priv->plat->dma_cfg, > + dummy_dma_tx_phy, dummy_dma_rx_phy, atds); > + Yet it is used here, still uninitialized. The compiler even warns about this.