Content-Type: multipart/mixed; boundary="===============0954641990735996686==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next v3 2/2] net: ethernet: Add driver for Sunplus SP7021 Date: Tue, 30 Nov 2021 21:51:29 +0800 Message-ID: <202111302126.kdjsLCiQ-lkp@intel.com> In-Reply-To: <1638266572-5831-3-git-send-email-wellslutw@gmail.com> List-Id: --===============0954641990735996686== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Wells, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Wells-Lu/This-is-a-patch-s= eries-for-pinctrl-driver-for-Sunplus-SP7021-SoC/20211130-180452 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git = 09ae03e2fc9d04240c21759ce9f1ef63d7651850 config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/2021113= 0/202111302126.kdjsLCiQ-lkp(a)intel.com/config) compiler: alpha-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/c5416cd4312a02ecbd1752129= b61392a857a45fb git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Wells-Lu/This-is-a-patch-series-fo= r-pinctrl-driver-for-Sunplus-SP7021-SoC/20211130-180452 git checkout c5416cd4312a02ecbd1752129b61392a857a45fb # 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=3Dalpha SHELL=3D/bin/bash drivers/net/ethernet/sunplus/ 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/sunplus/spl2sw_int.c: In function 'spl2sw_tx_poll': >> drivers/net/ethernet/sunplus/spl2sw_int.c:157:28: warning: variable 'mac= ' set but not used [-Wunused-but-set-variable] 157 | struct spl2sw_mac *mac; | ^~~ vim +/mac +157 drivers/net/ethernet/sunplus/spl2sw_int.c 151 = 152 int spl2sw_tx_poll(struct napi_struct *napi, int budget) 153 { 154 struct spl2sw_common *comm =3D container_of(napi, struct spl2sw_com= mon, tx_napi); 155 struct spl2sw_skb_info *skbinfo; 156 struct net_device_stats *stats; > 157 struct spl2sw_mac *mac; 158 u32 tx_done_pos; 159 u32 mask; 160 u32 cmd; 161 int i; 162 = 163 spin_lock(&comm->tx_lock); 164 = 165 tx_done_pos =3D comm->tx_done_pos; 166 while ((tx_done_pos !=3D comm->tx_pos) || (comm->tx_desc_full =3D= =3D 1)) { 167 cmd =3D comm->tx_desc[tx_done_pos].cmd1; 168 if (cmd & TXD_OWN) 169 break; 170 = 171 skbinfo =3D &comm->tx_temp_skb_info[tx_done_pos]; 172 if (unlikely(!skbinfo->skb)) 173 goto spl2sw_tx_poll_next; 174 = 175 i =3D spl2sw_bit_pos_to_port_num(FIELD_GET(TXD_VLAN, cmd)); 176 if (i < MAX_NETDEV_NUM && comm->ndev[i]) { 177 mac =3D netdev_priv(comm->ndev[i]); 178 stats =3D &comm->ndev[i]->stats; 179 } else { 180 goto spl2sw_tx_poll_unmap; 181 } 182 = 183 if (unlikely(cmd & (TXD_ERR_CODE))) { 184 stats->tx_errors++; 185 } else { 186 stats->tx_packets++; 187 stats->tx_bytes +=3D skbinfo->len; 188 } 189 = 190 spl2sw_tx_poll_unmap: 191 dma_unmap_single(&comm->pdev->dev, skbinfo->mapping, skbinfo->len, 192 DMA_TO_DEVICE); 193 skbinfo->mapping =3D 0; 194 dev_kfree_skb_irq(skbinfo->skb); 195 skbinfo->skb =3D NULL; 196 = 197 spl2sw_tx_poll_next: 198 /* Move tx_done_pos to next position */ 199 tx_done_pos =3D ((tx_done_pos + 1) =3D=3D TX_DESC_NUM) ? 0 : tx_do= ne_pos + 1; 200 = 201 if (comm->tx_desc_full =3D=3D 1) 202 comm->tx_desc_full =3D 0; 203 } 204 = 205 comm->tx_done_pos =3D tx_done_pos; 206 if (!comm->tx_desc_full) 207 for (i =3D 0; i < MAX_NETDEV_NUM; i++) 208 if (comm->ndev[i]) 209 if (netif_queue_stopped(comm->ndev[i])) 210 netif_wake_queue(comm->ndev[i]); 211 = 212 spin_unlock(&comm->tx_lock); 213 = 214 wmb(); /* make sure settings are effective. */ 215 mask =3D readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0); 216 mask &=3D ~MAC_INT_TX; 217 writel(mask, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0); 218 = 219 napi_complete(napi); 220 return 0; 221 } 222 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0954641990735996686==--