tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const head: 1b43a2983970f31597836e5571d42d9de443b44d commit: c49e138ce3dacbad5a16b63758003bdc71762ecc [17/18] driver core: make struct bus_type.uevent() take a const * config: powerpc-allmodconfig compiler: powerpc-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=c49e138ce3dacbad5a16b63758003bdc71762ecc git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git git fetch --no-tags driver-core kobject-const git checkout c49e138ce3dacbad5a16b63758003bdc71762ecc # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash sound/aoa/soundbus/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): sound/aoa/soundbus/core.c: In function 'soundbus_uevent': >> sound/aoa/soundbus/core.c:73:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 73 | of = &soundbus_dev->ofdev; | ^ vim +/const +73 sound/aoa/soundbus/core.c f3d9478b2ce468c Johannes Berg 2006-06-21 56 f3d9478b2ce468c Johannes Berg 2006-06-21 57 c49e138ce3dacba Greg Kroah-Hartman 2022-09-29 58 static int soundbus_uevent(const struct device *dev, struct kobj_uevent_env *env) f3d9478b2ce468c Johannes Berg 2006-06-21 59 { c49e138ce3dacba Greg Kroah-Hartman 2022-09-29 60 const struct soundbus_dev * soundbus_dev; 2dc115813768293 Grant Likely 2010-08-06 61 struct platform_device * of; a7edd0e676d5114 Stephen Rothwell 2007-04-03 62 const char *compat; 7eff2e7a8b65c25 Kay Sievers 2007-08-14 63 int retval = 0; bf62456eb91f3d2 Eric Rannaud 2007-03-30 64 int cplen, seen = 0; f3d9478b2ce468c Johannes Berg 2006-06-21 65 f3d9478b2ce468c Johannes Berg 2006-06-21 66 if (!dev) f3d9478b2ce468c Johannes Berg 2006-06-21 67 return -ENODEV; f3d9478b2ce468c Johannes Berg 2006-06-21 68 f3d9478b2ce468c Johannes Berg 2006-06-21 69 soundbus_dev = to_soundbus_device(dev); f3d9478b2ce468c Johannes Berg 2006-06-21 70 if (!soundbus_dev) f3d9478b2ce468c Johannes Berg 2006-06-21 71 return -ENODEV; f3d9478b2ce468c Johannes Berg 2006-06-21 72 f3d9478b2ce468c Johannes Berg 2006-06-21 @73 of = &soundbus_dev->ofdev; f3d9478b2ce468c Johannes Berg 2006-06-21 74 f3d9478b2ce468c Johannes Berg 2006-06-21 75 /* stuff we want to pass to /sbin/hotplug */ 192a7122954001a Rob Herring 2018-12-05 76 retval = add_uevent_var(env, "OF_NAME=%pOFn", of->dev.of_node); bf62456eb91f3d2 Eric Rannaud 2007-03-30 77 if (retval) bf62456eb91f3d2 Eric Rannaud 2007-03-30 78 return retval; bf62456eb91f3d2 Eric Rannaud 2007-03-30 79 c12faa2bc56cb1e Rob Herring 2018-11-16 80 retval = add_uevent_var(env, "OF_TYPE=%s", of_node_get_device_type(of->dev.of_node)); bf62456eb91f3d2 Eric Rannaud 2007-03-30 81 if (retval) bf62456eb91f3d2 Eric Rannaud 2007-03-30 82 return retval; f3d9478b2ce468c Johannes Berg 2006-06-21 83 f3d9478b2ce468c Johannes Berg 2006-06-21 84 /* Since the compatible field can contain pretty much anything f3d9478b2ce468c Johannes Berg 2006-06-21 85 * it's not really legal to split it out with commas. We split it f3d9478b2ce468c Johannes Berg 2006-06-21 86 * up using a number of environment variables instead. */ f3d9478b2ce468c Johannes Berg 2006-06-21 87 61c7a080a5a061c Grant Likely 2010-04-13 88 compat = of_get_property(of->dev.of_node, "compatible", &cplen); f3d9478b2ce468c Johannes Berg 2006-06-21 89 while (compat && cplen > 0) { 7eff2e7a8b65c25 Kay Sievers 2007-08-14 90 int tmp = env->buflen; 7eff2e7a8b65c25 Kay Sievers 2007-08-14 91 retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat); bf62456eb91f3d2 Eric Rannaud 2007-03-30 92 if (retval) bf62456eb91f3d2 Eric Rannaud 2007-03-30 93 return retval; 7eff2e7a8b65c25 Kay Sievers 2007-08-14 94 compat += env->buflen - tmp; 7eff2e7a8b65c25 Kay Sievers 2007-08-14 95 cplen -= env->buflen - tmp; bf62456eb91f3d2 Eric Rannaud 2007-03-30 96 seen += 1; f3d9478b2ce468c Johannes Berg 2006-06-21 97 } f3d9478b2ce468c Johannes Berg 2006-06-21 98 7eff2e7a8b65c25 Kay Sievers 2007-08-14 99 retval = add_uevent_var(env, "OF_COMPATIBLE_N=%d", seen); bf62456eb91f3d2 Eric Rannaud 2007-03-30 100 if (retval) bf62456eb91f3d2 Eric Rannaud 2007-03-30 101 return retval; 7eff2e7a8b65c25 Kay Sievers 2007-08-14 102 retval = add_uevent_var(env, "MODALIAS=%s", soundbus_dev->modalias); f3d9478b2ce468c Johannes Berg 2006-06-21 103 bf62456eb91f3d2 Eric Rannaud 2007-03-30 104 return retval; f3d9478b2ce468c Johannes Berg 2006-06-21 105 } f3d9478b2ce468c Johannes Berg 2006-06-21 106 :::::: The code at line 73 was first introduced by commit :::::: f3d9478b2ce468c3115b02ecae7e975990697f15 [ALSA] snd-aoa: add snd-aoa :::::: TO: Johannes Berg :::::: CC: Jaroslav Kysela -- 0-DAY CI Kernel Test Service https://01.org/lkp