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]
Message-ID: <202210122306.HiJ49GVB-lkp@intel.com>
Date:   Wed, 12 Oct 2022 23:37:20 +0800
From:   kernel test robot <lkp@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     kbuild-all@...ts.01.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: [driver-core:kobject-const 17/18] arch/sparc/kernel/vio.c:51:52:
 error: passing argument 1 of 'to_vio_dev' discards 'const' qualifier from
 pointer target type

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head:   6e2a4c41f786eaf21f2c1daadfaf524d1954ed4c
commit: 9ae4fcf3c0ac99bf8ffe0aa8db744b3627b54b3d [17/18] driver core: make struct bus_type.uevent() take a const *
config: sparc64-buildonly-randconfig-r006-20221012
compiler: sparc64-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=9ae4fcf3c0ac99bf8ffe0aa8db744b3627b54b3d
        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 9ae4fcf3c0ac99bf8ffe0aa8db744b3627b54b3d
        # 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=sparc64 SHELL=/bin/bash arch/sparc/kernel/

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

   arch/sparc/kernel/vio.c: In function 'vio_hotplug':
>> arch/sparc/kernel/vio.c:51:52: error: passing argument 1 of 'to_vio_dev' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
      51 |         const struct vio_dev *vio_dev = to_vio_dev(dev);
         |                                                    ^~~
   In file included from arch/sparc/kernel/vio.c:20:
   arch/sparc/include/asm/vio.h:491:57: note: expected 'struct device *' but argument is of type 'const struct device *'
     491 | static inline struct vio_dev *to_vio_dev(struct device *dev)
         |                                          ~~~~~~~~~~~~~~~^~~
   cc1: all warnings being treated as errors


vim +51 arch/sparc/kernel/vio.c

e53e97ce3c7119 arch/sparc64/kernel/vio.c David S. Miller           2007-07-09  48  
9ae4fcf3c0ac99 arch/sparc/kernel/vio.c   Greg Kroah-Hartman        2022-09-29  49  static int vio_hotplug(const struct device *dev, struct kobj_uevent_env *env)
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14  50  {
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14 @51  	const struct vio_dev *vio_dev = to_vio_dev(dev);
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14  52  
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14  53  	add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, vio_dev->compat);
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14  54  	return 0;
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14  55  }
5bde2c9be701c4 arch/sparc/kernel/vio.c   John Paul Adrian Glaubitz 2016-04-14  56  

:::::: The code at line 51 was first introduced by commit
:::::: 5bde2c9be701c4583f0a9243bd46590ec401bfba sparc: Implement and wire up vio_hotplug for vio.

:::::: TO: Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
:::::: CC: David S. Miller <davem@...emloft.net>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ