Messages in this thread | | | Subject | Re: drivers/net/ethernet/lantiq_etop.c:265:62: error: 'rx_burst_len' undeclared | From | Randy Dunlap <> | Date | Tue, 9 Nov 2021 11:21:27 -0800 |
| |
On 11/8/21 2:29 PM, kernel test robot wrote: > Hi Aleksander, > > FYI, the error/warning still remains. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: d2f38a3c6507b2520101f9a3807ed98f1bdc545a > commit: 14d4e308e0aa0b78dc7a059716861a4380de3535 net: lantiq: configure the burst length in ethernet drivers > date: 8 weeks ago > config: mips-xway_defconfig (attached as .config) > compiler: mips-linux-gcc (GCC) 11.2.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=14d4e308e0aa0b78dc7a059716861a4380de3535 > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git fetch --no-tags linus master > git checkout 14d4e308e0aa0b78dc7a059716861a4380de3535 > # save the attached .config to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > > drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_hw_init': >>> drivers/net/ethernet/lantiq_etop.c:265:62: error: 'rx_burst_len' undeclared (first use in this function) > 265 | ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len); > | ^~~~~~~~~~~~
>>>>>>>>>>>>>>>>>>> priv->rx_burs_len);
> drivers/net/ethernet/lantiq_etop.c:265:62: note: each undeclared identifier is reported only once for each function it appears in > drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_probe': >>> drivers/net/ethernet/lantiq_etop.c:673:15: error: implicit declaration of function 'device_property_read_u32' [-Werror=implicit-function-declaration] > 673 | err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len); > | ^~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/ethernet/lantiq_etop.c: At top level: > drivers/net/ethernet/lantiq_etop.c:730:1: warning: no previous prototype for 'init_ltq_etop' [-Wmissing-prototypes] > 730 | init_ltq_etop(void) > | ^~~~~~~~~~~~~ > drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_hw_init': > drivers/net/ethernet/lantiq_etop.c:276:25: warning: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Wunused-result] > 276 | request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/ethernet/lantiq_etop.c:284:25: warning: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Wunused-result] > 284 | request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors
Hi Aleksander, Are you taking care of this report from kernel test robot? If not, I can send a patch.
> > > vim +/rx_burst_len +265 drivers/net/ethernet/lantiq_etop.c > > 236 > 237 static int > 238 ltq_etop_hw_init(struct net_device *dev) > 239 { > 240 struct ltq_etop_priv *priv = netdev_priv(dev); > 241 int i; > 242 > 243 ltq_pmu_enable(PMU_PPE); > 244 > 245 switch (priv->pldata->mii_mode) { > 246 case PHY_INTERFACE_MODE_RMII: > 247 ltq_etop_w32_mask(ETOP_MII_MASK, > 248 ETOP_MII_REVERSE, LTQ_ETOP_CFG); > 249 break; > 250 > 251 case PHY_INTERFACE_MODE_MII: > 252 ltq_etop_w32_mask(ETOP_MII_MASK, > 253 ETOP_MII_NORMAL, LTQ_ETOP_CFG); > 254 break; > 255 > 256 default: > 257 netdev_err(dev, "unknown mii mode %d\n", > 258 priv->pldata->mii_mode); > 259 return -ENOTSUPP; > 260 } > 261 > 262 /* enable crc generation */ > 263 ltq_etop_w32(PPE32_CGEN, LQ_PPE32_ENET_MAC_CFG); > 264 > > 265 ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len); > 266 > 267 for (i = 0; i < MAX_DMA_CHAN; i++) { > 268 int irq = LTQ_DMA_CH0_INT + i; > 269 struct ltq_etop_chan *ch = &priv->ch[i]; > 270 > 271 ch->idx = ch->dma.nr = i; > 272 ch->dma.dev = &priv->pdev->dev; > 273 > 274 if (IS_TX(i)) { > 275 ltq_dma_alloc_tx(&ch->dma); > 276 request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv); > 277 } else if (IS_RX(i)) { > 278 ltq_dma_alloc_rx(&ch->dma); > 279 for (ch->dma.desc = 0; ch->dma.desc < LTQ_DESC_NUM; > 280 ch->dma.desc++) > 281 if (ltq_etop_alloc_skb(ch)) > 282 return -ENOMEM; > 283 ch->dma.desc = 0; > 284 request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv); > 285 } > 286 ch->dma.irq = irq; > 287 } > 288 return 0; > 289 } > 290 > > ---
-- ~Randy
| |