Thread (7 messages) 7 messages, 4 authors, 2025-12-20

Re: [PATCH v2] net: dsa: Fix error handling in dsa_port_parse_of

From: kernel test robot <hidden>
Date: 2025-12-20 14:35:12
Also in: lkml, llvm, oe-kbuild-all, 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.19-rc1 next-20251219]
[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/20251214-211443
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251214131204.4684-1-make24%40iscas.ac.cn
patch subject: [PATCH v2] net: dsa: Fix error handling in dsa_port_parse_of
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20251220/202512202210.PkOvVaCv-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251220/202512202210.PkOvVaCv-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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202512202210.PkOvVaCv-lkp@intel.com/ (local)

All errors (new ones prefixed by >>):
quoted
net/dsa/dsa.c:1266:15: error: incompatible pointer types passing 'struct net_device *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
    1266 |                         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 +1266 net/dsa/dsa.c

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

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help