netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dipendra Khadka <kdipendra88@gmail.com>,
	andrew@lunn.ch, florian.fainelli@broadcom.com,
	davem@davemloft.net, edumazet@google.com,
	bcm-kernel-feedback-list@broadcom.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev,
	Dipendra Khadka <kdipendra88@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net] net: Add error pointer check in bcmsysport.c
Date: Tue, 24 Sep 2024 03:44:13 +0800	[thread overview]
Message-ID: <202409240305.PgIkDx1K-lkp@intel.com> (raw)
In-Reply-To: <20240923053900.1310-1-kdipendra88@gmail.com>

Hi Dipendra,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Dipendra-Khadka/net-Add-error-pointer-check-in-bcmsysport-c/20240923-134407
base:   net/main
patch link:    https://lore.kernel.org/r/20240923053900.1310-1-kdipendra88%40gmail.com
patch subject: [PATCH v2 net] net: Add error pointer check in bcmsysport.c
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20240924/202409240305.PgIkDx1K-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240924/202409240305.PgIkDx1K-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409240305.PgIkDx1K-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/bcmsysport.c: In function 'bcm_sysport_map_queues':
>> drivers/net/ethernet/broadcom/bcmsysport.c:2341:24: error: implicit declaration of function 'PRT_ERR'; did you mean 'PTR_ERR'? [-Werror=implicit-function-declaration]
    2341 |                 return PRT_ERR(dp);
         |                        ^~~~~~~
         |                        PTR_ERR
   cc1: some warnings being treated as errors


vim +2341 drivers/net/ethernet/broadcom/bcmsysport.c

  2330	
  2331	static int bcm_sysport_map_queues(struct net_device *dev,
  2332					  struct net_device *slave_dev)
  2333	{
  2334		struct dsa_port *dp = dsa_port_from_netdev(slave_dev);
  2335		struct bcm_sysport_priv *priv = netdev_priv(dev);
  2336		struct bcm_sysport_tx_ring *ring;
  2337		unsigned int num_tx_queues;
  2338		unsigned int q, qp, port;
  2339	
  2340		if (IS_ERR(dp))
> 2341			return PRT_ERR(dp);
  2342	
  2343		/* We can't be setting up queue inspection for non directly attached
  2344		 * switches
  2345		 */
  2346		if (dp->ds->index)
  2347			return 0;
  2348	
  2349		port = dp->index;
  2350	
  2351		/* On SYSTEMPORT Lite we have twice as less queues, so we cannot do a
  2352		 * 1:1 mapping, we can only do a 2:1 mapping. By reducing the number of
  2353		 * per-port (slave_dev) network devices queue, we achieve just that.
  2354		 * This need to happen now before any slave network device is used such
  2355		 * it accurately reflects the number of real TX queues.
  2356		 */
  2357		if (priv->is_lite)
  2358			netif_set_real_num_tx_queues(slave_dev,
  2359						     slave_dev->num_tx_queues / 2);
  2360	
  2361		num_tx_queues = slave_dev->real_num_tx_queues;
  2362	
  2363		if (priv->per_port_num_tx_queues &&
  2364		    priv->per_port_num_tx_queues != num_tx_queues)
  2365			netdev_warn(slave_dev, "asymmetric number of per-port queues\n");
  2366	
  2367		priv->per_port_num_tx_queues = num_tx_queues;
  2368	
  2369		for (q = 0, qp = 0; q < dev->num_tx_queues && qp < num_tx_queues;
  2370		     q++) {
  2371			ring = &priv->tx_rings[q];
  2372	
  2373			if (ring->inspect)
  2374				continue;
  2375	
  2376			/* Just remember the mapping actual programming done
  2377			 * during bcm_sysport_init_tx_ring
  2378			 */
  2379			ring->switch_queue = qp;
  2380			ring->switch_port = port;
  2381			ring->inspect = true;
  2382			priv->ring_map[qp + port * num_tx_queues] = ring;
  2383			qp++;
  2384		}
  2385	
  2386		return 0;
  2387	}
  2388	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2024-09-23 19:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23  5:38 [PATCH v2 net] net: Add error pointer check in bcmsysport.c Dipendra Khadka
2024-09-23 16:19 ` Simon Horman
2024-09-23 16:39   ` Dipendra Khadka
2024-09-23 17:27     ` Florian Fainelli
2024-09-23 19:33 ` kernel test robot
2024-09-23 19:44 ` kernel test robot [this message]

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=202409240305.PgIkDx1K-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kdipendra88@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).