All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wells Lu <wellslutw@gmail.com>,
	davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, p.zabel@pengutronix.de
Cc: kbuild-all@lists.01.org, wells.lu@sunplus.com,
	vincent.shih@sunplus.com, Wells Lu <wellslutw@gmail.com>
Subject: Re: [PATCH net-next v3 2/2] net: ethernet: Add driver for Sunplus SP7021
Date: Tue, 30 Nov 2021 21:51:29 +0800	[thread overview]
Message-ID: <202111302126.kdjsLCiQ-lkp@intel.com> (raw)
In-Reply-To: <1638266572-5831-3-git-send-email-wellslutw@gmail.com>

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-series-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/20211130/202111302126.kdjsLCiQ-lkp@intel.com/config)
compiler: alpha-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://github.com/0day-ci/linux/commit/c5416cd4312a02ecbd1752129b61392a857a45fb
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Wells-Lu/This-is-a-patch-series-for-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=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/ethernet/sunplus/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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 = container_of(napi, struct spl2sw_common, 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 = comm->tx_done_pos;
   166		while ((tx_done_pos != comm->tx_pos) || (comm->tx_desc_full == 1)) {
   167			cmd = comm->tx_desc[tx_done_pos].cmd1;
   168			if (cmd & TXD_OWN)
   169				break;
   170	
   171			skbinfo = &comm->tx_temp_skb_info[tx_done_pos];
   172			if (unlikely(!skbinfo->skb))
   173				goto spl2sw_tx_poll_next;
   174	
   175			i = spl2sw_bit_pos_to_port_num(FIELD_GET(TXD_VLAN, cmd));
   176			if (i < MAX_NETDEV_NUM && comm->ndev[i]) {
   177				mac = netdev_priv(comm->ndev[i]);
   178				stats = &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 += 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 = 0;
   194			dev_kfree_skb_irq(skbinfo->skb);
   195			skbinfo->skb = NULL;
   196	
   197	spl2sw_tx_poll_next:
   198			/* Move tx_done_pos to next position */
   199			tx_done_pos = ((tx_done_pos + 1) == TX_DESC_NUM) ? 0 : tx_done_pos + 1;
   200	
   201			if (comm->tx_desc_full == 1)
   202				comm->tx_desc_full = 0;
   203		}
   204	
   205		comm->tx_done_pos = tx_done_pos;
   206		if (!comm->tx_desc_full)
   207			for (i = 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 = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
   216		mask &= ~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@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
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	[thread overview]
Message-ID: <202111302126.kdjsLCiQ-lkp@intel.com> (raw)
In-Reply-To: <1638266572-5831-3-git-send-email-wellslutw@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4301 bytes --]

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-series-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/20211130/202111302126.kdjsLCiQ-lkp(a)intel.com/config)
compiler: alpha-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://github.com/0day-ci/linux/commit/c5416cd4312a02ecbd1752129b61392a857a45fb
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Wells-Lu/This-is-a-patch-series-for-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=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/ethernet/sunplus/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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 = container_of(napi, struct spl2sw_common, 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 = comm->tx_done_pos;
   166		while ((tx_done_pos != comm->tx_pos) || (comm->tx_desc_full == 1)) {
   167			cmd = comm->tx_desc[tx_done_pos].cmd1;
   168			if (cmd & TXD_OWN)
   169				break;
   170	
   171			skbinfo = &comm->tx_temp_skb_info[tx_done_pos];
   172			if (unlikely(!skbinfo->skb))
   173				goto spl2sw_tx_poll_next;
   174	
   175			i = spl2sw_bit_pos_to_port_num(FIELD_GET(TXD_VLAN, cmd));
   176			if (i < MAX_NETDEV_NUM && comm->ndev[i]) {
   177				mac = netdev_priv(comm->ndev[i]);
   178				stats = &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 += 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 = 0;
   194			dev_kfree_skb_irq(skbinfo->skb);
   195			skbinfo->skb = NULL;
   196	
   197	spl2sw_tx_poll_next:
   198			/* Move tx_done_pos to next position */
   199			tx_done_pos = ((tx_done_pos + 1) == TX_DESC_NUM) ? 0 : tx_done_pos + 1;
   200	
   201			if (comm->tx_desc_full == 1)
   202				comm->tx_desc_full = 0;
   203		}
   204	
   205		comm->tx_done_pos = tx_done_pos;
   206		if (!comm->tx_desc_full)
   207			for (i = 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 = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
   216		mask &= ~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

  reply	other threads:[~2021-11-30 13:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 10:02 [PATCH net-next v3 0/2] This is a patch series for pinctrl driver for Sunplus SP7021 SoC Wells Lu
2021-11-30 10:02 ` [PATCH net-next v3 1/2] devicetree: bindings: net: Add bindings doc for Sunplus SP7021 Wells Lu
2021-12-01  1:56   ` Andrew Lunn
2021-12-01  7:02     ` Wells Lu 呂芳騰
2021-11-30 10:02 ` [PATCH net-next v3 2/2] net: ethernet: Add driver " Wells Lu
2021-11-30 13:51   ` kernel test robot [this message]
2021-11-30 13:51     ` kernel test robot
2021-12-01  3:30   ` Andrew Lunn
2021-12-02 11:20     ` Wells Lu 呂芳騰
2021-12-02 13:04       ` Andrew Lunn
2021-12-02 18:46         ` Wells Lu 呂芳騰
2021-12-02 19:03           ` Andrew Lunn
2021-12-03  1:36             ` Wells Lu 呂芳騰
2021-11-30 20:17 ` [PATCH net-next v3 0/2] This is a patch series for pinctrl driver for Sunplus SP7021 SoC Andrew Lunn
2021-12-01  1:42   ` Wells Lu 呂芳騰

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111302126.kdjsLCiQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=vincent.shih@sunplus.com \
    --cc=wells.lu@sunplus.com \
    --cc=wellslutw@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.