Subject: Re: [PATCH net-next v10 4/4] net: dsa: add basic initial driver for MxL862xx switches

From: kernel test robot <[email-masked]>
Date: Fri, 30 Jan 2026 15:40:42 +0800

Hi Daniel,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Daniel-Golle/dt-bindings-net-dsa-add-MaxLinear-MxL862xx/20260130-085313
base:   net-next/main
patch link:    https://lore.kernel.org/r/281fd7e777b51849fac9ef5191679586cc2a1b54.1769731630.git.daniel%40makrotopia.org
patch subject: [PATCH net-next v10 4/4] net: dsa: add basic initial driver for MxL862xx switches
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260130/[email-masked]/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260130/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All errors (new ones prefixed by >>):

   drivers/net/dsa/mxl862xx/mxl862xx.c: In function 'mxl862xx_port_setup':
>> drivers/net/dsa/mxl862xx/mxl862xx.c:331:32: error: passing argument 1 of 'dsa_port_is_unused' from incompatible pointer type [-Wincompatible-pointer-types]
     331 |         if (dsa_port_is_unused(ds, port) ||
         |                                ^~
         |                                |
         |                                struct dsa_switch *
   In file included from drivers/net/dsa/mxl862xx/mxl862xx.c:16:
   include/net/dsa.h:546:56: note: expected 'struct dsa_port *' but argument is of type 'struct dsa_switch *'
     546 | static inline bool dsa_port_is_unused(struct dsa_port *dp)
         |                                       ~~~~~~~~~~~~~~~~~^~
>> drivers/net/dsa/mxl862xx/mxl862xx.c:331:13: error: too many arguments to function 'dsa_port_is_unused'; expected 1, have 2
     331 |         if (dsa_port_is_unused(ds, port) ||
         |             ^~~~~~~~~~~~~~~~~~     ~~~~
   include/net/dsa.h:546:20: note: declared here
     546 | static inline bool dsa_port_is_unused(struct dsa_port *dp)
         |                    ^~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/mxl862xx/mxl862xx.c:332:29: error: passing argument 1 of 'dsa_port_is_dsa' from incompatible pointer type [-Wincompatible-pointer-types]
     332 |             dsa_port_is_dsa(ds, port))
         |                             ^~
         |                             |
         |                             struct dsa_switch *
   include/net/dsa.h:531:53: note: expected 'struct dsa_port *' but argument is of type 'struct dsa_switch *'
     531 | static inline bool dsa_port_is_dsa(struct dsa_port *port)
         |                                    ~~~~~~~~~~~~~~~~~^~~~
>> drivers/net/dsa/mxl862xx/mxl862xx.c:332:13: error: too many arguments to function 'dsa_port_is_dsa'; expected 1, have 2
     332 |             dsa_port_is_dsa(ds, port))
         |             ^~~~~~~~~~~~~~~     ~~~~
   include/net/dsa.h:531:20: note: declared here
     531 | static inline bool dsa_port_is_dsa(struct dsa_port *port)
         |                    ^~~~~~~~~~~~~~~

vim +/dsa_port_is_unused +331 drivers/net/dsa/mxl862xx/mxl862xx.c

   317	
   318	static int mxl862xx_port_setup(struct dsa_switch *ds, int port)
   319	{
   320		bool is_cpu_port = dsa_is_cpu_port(ds, port);
   321		int ret;
   322	
   323		/* disable port and flush MAC entries */
   324		ret = mxl862xx_port_state(ds, port, false);
   325		if (ret)
   326			return ret;
   327	
   328		mxl862xx_port_fast_age(ds, port);
   329	
   330		/* skip setup for unused and DSA ports */
 > 331		if (dsa_port_is_unused(ds, port) ||
 > 332		    dsa_port_is_dsa(ds, port))
   333			return 0;
   334	
   335		/* configure tag protocol */
   336		ret = mxl862xx_configure_sp_tag_proto(ds, port, is_cpu_port);
   337		if (ret)
   338			return ret;
   339	
   340		/* assign CTP port IDs */
   341		ret = mxl862xx_configure_ctp_port(ds, port, port,
   342						  is_cpu_port ? 32 - port : 1);
   343		if (ret)
   344			return ret;
   345	
   346		if (is_cpu_port)
   347			/* assign user ports to CPU port bridge */
   348			return mxl862xx_setup_cpu_bridge(ds, port);
   349	
   350		/* setup single-port bridge for user ports */
   351		return mxl862xx_add_single_port_bridge(ds, port);
   352	}
   353	

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