lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 7 Oct 2022 14:24:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [driver-core:kobject-const 17/18] sound/aoa/soundbus/core.c:73:5:
 error: assigning to 'struct platform_device *' from 'const struct
 platform_device *' discards qualifiers

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-g5_defconfig
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # 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=clang 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 <lkp@...el.com>

All errors (new ones prefixed by >>):

>> sound/aoa/soundbus/core.c:73:5: error: assigning to 'struct platform_device *' from 'const struct platform_device *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
           of = &soundbus_dev->ofdev;
              ^ ~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +73 sound/aoa/soundbus/core.c

f3d9478b2ce468 Johannes Berg      2006-06-21   56  
f3d9478b2ce468 Johannes Berg      2006-06-21   57  
c49e138ce3dacb Greg Kroah-Hartman 2022-09-29   58  static int soundbus_uevent(const struct device *dev, struct kobj_uevent_env *env)
f3d9478b2ce468 Johannes Berg      2006-06-21   59  {
c49e138ce3dacb Greg Kroah-Hartman 2022-09-29   60  	const struct soundbus_dev * soundbus_dev;
2dc11581376829 Grant Likely       2010-08-06   61  	struct platform_device * of;
a7edd0e676d511 Stephen Rothwell   2007-04-03   62  	const char *compat;
7eff2e7a8b65c2 Kay Sievers        2007-08-14   63  	int retval = 0;
bf62456eb91f3d Eric Rannaud       2007-03-30   64  	int cplen, seen = 0;
f3d9478b2ce468 Johannes Berg      2006-06-21   65  
f3d9478b2ce468 Johannes Berg      2006-06-21   66  	if (!dev)
f3d9478b2ce468 Johannes Berg      2006-06-21   67  		return -ENODEV;
f3d9478b2ce468 Johannes Berg      2006-06-21   68  
f3d9478b2ce468 Johannes Berg      2006-06-21   69  	soundbus_dev = to_soundbus_device(dev);
f3d9478b2ce468 Johannes Berg      2006-06-21   70  	if (!soundbus_dev)
f3d9478b2ce468 Johannes Berg      2006-06-21   71  		return -ENODEV;
f3d9478b2ce468 Johannes Berg      2006-06-21   72  
f3d9478b2ce468 Johannes Berg      2006-06-21  @73  	of = &soundbus_dev->ofdev;
f3d9478b2ce468 Johannes Berg      2006-06-21   74  
f3d9478b2ce468 Johannes Berg      2006-06-21   75  	/* stuff we want to pass to /sbin/hotplug */
192a7122954001 Rob Herring        2018-12-05   76  	retval = add_uevent_var(env, "OF_NAME=%pOFn", of->dev.of_node);
bf62456eb91f3d Eric Rannaud       2007-03-30   77  	if (retval)
bf62456eb91f3d Eric Rannaud       2007-03-30   78  		return retval;
bf62456eb91f3d Eric Rannaud       2007-03-30   79  
c12faa2bc56cb1 Rob Herring        2018-11-16   80  	retval = add_uevent_var(env, "OF_TYPE=%s", of_node_get_device_type(of->dev.of_node));
bf62456eb91f3d Eric Rannaud       2007-03-30   81  	if (retval)
bf62456eb91f3d Eric Rannaud       2007-03-30   82  		return retval;
f3d9478b2ce468 Johannes Berg      2006-06-21   83  
f3d9478b2ce468 Johannes Berg      2006-06-21   84  	/* Since the compatible field can contain pretty much anything
f3d9478b2ce468 Johannes Berg      2006-06-21   85  	 * it's not really legal to split it out with commas. We split it
f3d9478b2ce468 Johannes Berg      2006-06-21   86  	 * up using a number of environment variables instead. */
f3d9478b2ce468 Johannes Berg      2006-06-21   87  
61c7a080a5a061 Grant Likely       2010-04-13   88  	compat = of_get_property(of->dev.of_node, "compatible", &cplen);
f3d9478b2ce468 Johannes Berg      2006-06-21   89  	while (compat && cplen > 0) {
7eff2e7a8b65c2 Kay Sievers        2007-08-14   90  		int tmp = env->buflen;
7eff2e7a8b65c2 Kay Sievers        2007-08-14   91  		retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat);
bf62456eb91f3d Eric Rannaud       2007-03-30   92  		if (retval)
bf62456eb91f3d Eric Rannaud       2007-03-30   93  			return retval;
7eff2e7a8b65c2 Kay Sievers        2007-08-14   94  		compat += env->buflen - tmp;
7eff2e7a8b65c2 Kay Sievers        2007-08-14   95  		cplen -= env->buflen - tmp;
bf62456eb91f3d Eric Rannaud       2007-03-30   96  		seen += 1;
f3d9478b2ce468 Johannes Berg      2006-06-21   97  	}
f3d9478b2ce468 Johannes Berg      2006-06-21   98  
7eff2e7a8b65c2 Kay Sievers        2007-08-14   99  	retval = add_uevent_var(env, "OF_COMPATIBLE_N=%d", seen);
bf62456eb91f3d Eric Rannaud       2007-03-30  100  	if (retval)
bf62456eb91f3d Eric Rannaud       2007-03-30  101  		return retval;
7eff2e7a8b65c2 Kay Sievers        2007-08-14  102  	retval = add_uevent_var(env, "MODALIAS=%s", soundbus_dev->modalias);
f3d9478b2ce468 Johannes Berg      2006-06-21  103  
bf62456eb91f3d Eric Rannaud       2007-03-30  104  	return retval;
f3d9478b2ce468 Johannes Berg      2006-06-21  105  }
f3d9478b2ce468 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 <johannes@...solutions.net>
:::::: CC: Jaroslav Kysela <perex@...e.cz>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (98967 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ