Content-Type: multipart/mixed; boundary="===============8268141527651596391==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next v3 4/4] net: ocelot: add FDMA support Date: Sat, 27 Nov 2021 04:04:11 +0800 Message-ID: <202111270323.iOXcpsFC-lkp@intel.com> In-Reply-To: <20211126172739.329098-5-clement.leger@bootlin.com> List-Id: --===============8268141527651596391== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi "Cl=C3=A9ment, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on net/master linus/master v5.16-rc2 next-20211126] [cannot apply to net-next/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Cl-ment-L-ger/Add-FDMA-sup= port-on-ocelot-switch-driver/20211127-013140 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-= next config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20211127= /202111270323.iOXcpsFC-lkp(a)intel.com/config) compiler: m68k-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/07c95fe9105be293d2b7edf19= 3e5fd139c70c194 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Cl-ment-L-ger/Add-FDMA-support-on-= ocelot-switch-driver/20211127-013140 git checkout 07c95fe9105be293d2b7edf193e5fd139c70c194 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dm68k SHELL=3D/bin/bash drivers/net/ethernet/mscc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/net/ethernet/mscc/ocelot_fdma.c: In function 'ocelot_fdma_tx_cle= anup': >> drivers/net/ethernet/mscc/ocelot_fdma.c:306:22: warning: variable 'tmp_h= ead' set but not used [-Wunused-but-set-variable] 306 | unsigned int tmp_head, new_null_llp_idx; | ^~~~~~~~ vim +/tmp_head +306 drivers/net/ethernet/mscc/ocelot_fdma.c 302 = 303 static void ocelot_fdma_tx_cleanup(struct ocelot_fdma *fdma, int bud= get) 304 { 305 struct ocelot_fdma_ring *ring =3D &fdma->inj; > 306 unsigned int tmp_head, new_null_llp_idx; 307 struct ocelot_fdma_dcb *dcb; 308 bool end_of_list =3D false; 309 int ret; 310 = 311 spin_lock_bh(&fdma->xmit_lock); 312 = 313 /* Purge the TX packets that have been sent up to the NULL llp or t= he 314 * end of done list. 315 */ 316 while (!ocelot_fdma_ring_empty(&fdma->inj)) { 317 dcb =3D &ring->dcbs[ring->head]; 318 if (!(dcb->hw->stat & MSCC_FDMA_DCB_STAT_PD)) 319 break; 320 = 321 tmp_head =3D ring->head; 322 ring->head =3D ocelot_fdma_idx_incr(ring->head); 323 = 324 dma_unmap_single(fdma->dev, dcb->mapping, dcb->mapped_size, 325 DMA_TO_DEVICE); 326 napi_consume_skb(dcb->skb, budget); 327 = 328 /* If we hit the NULL LLP, stop, we might need to reload FDMA */ 329 if (dcb->hw->llp =3D=3D 0) { 330 end_of_list =3D true; 331 break; 332 } 333 } 334 = 335 /* If there is still some DCBs to be processed by the FDMA or if the 336 * pending list is empty, there is no need to restart the FDMA. 337 */ 338 if (!end_of_list || ocelot_fdma_ring_empty(&fdma->inj)) 339 goto out_unlock; 340 = 341 ret =3D ocelot_fdma_wait_chan_safe(fdma, MSCC_FDMA_INJ_CHAN); 342 if (ret) { 343 dev_warn(fdma->dev, "Failed to wait for TX channel to stop\n"); 344 goto out_unlock; 345 } 346 = 347 /* Set NULL LLP */ 348 new_null_llp_idx =3D ocelot_fdma_idx_decr(ring->tail); 349 dcb =3D &ring->dcbs[new_null_llp_idx]; 350 dcb->hw->llp =3D 0; 351 = 352 dcb =3D &ring->dcbs[ring->head]; 353 ocelot_fdma_activate_chan(fdma, dcb, MSCC_FDMA_INJ_CHAN); 354 = 355 out_unlock: 356 spin_unlock_bh(&fdma->xmit_lock); 357 } 358 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8268141527651596391==--