llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] net: dsa: Fix error handling in dsa_port_parse_of
       [not found] <20251121035130.16020-1-make24@iscas.ac.cn>
@ 2025-11-21 18:07 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-21 18:07 UTC (permalink / raw)
  To: Ma Ke, andrew, olteanv, davem, edumazet, kuba, pabeni, horms,
	florian.fainelli, stephen, robh
  Cc: llvm, oe-kbuild-all, netdev, linux-kernel, akpm, Ma Ke, stable

Hi Ma,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v6.18-rc6 next-20251121]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ma-Ke/net-dsa-Fix-error-handling-in-dsa_port_parse_of/20251121-115449
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251121035130.16020-1-make24%40iscas.ac.cn
patch subject: [PATCH] net: dsa: Fix error handling in dsa_port_parse_of
config: i386-randconfig-004-20251121 (https://download.01.org/0day-ci/archive/20251122/202511220109.1PvI00Sr-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251122/202511220109.1PvI00Sr-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/202511220109.1PvI00Sr-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/dsa/dsa.c:1265:15: error: incompatible pointer types passing 'struct net_device *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
    1265 |                         put_device(conduit);
         |                                    ^~~~~~~
   include/linux/device.h:1181:32: note: passing argument to parameter 'dev' here
    1181 | void put_device(struct device *dev);
         |                                ^
   1 error generated.


vim +1265 net/dsa/dsa.c

  1243	
  1244	static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn)
  1245	{
  1246		struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0);
  1247		const char *name = of_get_property(dn, "label", NULL);
  1248		bool link = of_property_read_bool(dn, "link");
  1249		int err;
  1250	
  1251		dp->dn = dn;
  1252	
  1253		if (ethernet) {
  1254			struct net_device *conduit;
  1255			const char *user_protocol;
  1256	
  1257			conduit = of_find_net_device_by_node(ethernet);
  1258			of_node_put(ethernet);
  1259			if (!conduit)
  1260				return -EPROBE_DEFER;
  1261	
  1262			user_protocol = of_get_property(dn, "dsa-tag-protocol", NULL);
  1263			err = dsa_port_parse_cpu(dp, conduit, user_protocol);
  1264			if (err) {
> 1265				put_device(conduit);
  1266				return err;
  1267			}
  1268	
  1269			return 0;
  1270		}
  1271	
  1272		if (link)
  1273			return dsa_port_parse_dsa(dp);
  1274	
  1275		return dsa_port_parse_user(dp, name);
  1276	}
  1277	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-21 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20251121035130.16020-1-make24@iscas.ac.cn>
2025-11-21 18:07 ` [PATCH] net: dsa: Fix error handling in dsa_port_parse_of kernel test robot

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).