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: <202209300345.Jk4ZEzkf-lkp@intel.com>
Date:   Fri, 30 Sep 2022 03:15:38 +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 12/18]
 drivers/i2c/i2c-core-base.c:148:35: error: passing 'const struct device *'
 to parameter of type 'struct device *' discards qualifiers

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head:   bdafbcc6c07cf164a8b73f0dc3fa7b9b46ac5064
commit: f01cf8eb19cb72bcd55351987a53c6f8f0b740ee [12/18] driver core: make struct device_type.uevent() take a const *
config: hexagon-randconfig-r045-20220925
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=f01cf8eb19cb72bcd55351987a53c6f8f0b740ee
        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 f01cf8eb19cb72bcd55351987a53c6f8f0b740ee
        # 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=hexagon SHELL=/bin/bash drivers/base/ drivers/i2c/ drivers/tty/serdev/

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

>> drivers/i2c/i2c-core-base.c:148:35: error: passing 'const struct device *' to parameter of type 'struct device *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
           rc = acpi_device_uevent_modalias(dev, env);
                                            ^~~
   include/linux/acpi.h:951:62: note: passing argument to parameter 'dev' here
   static inline int acpi_device_uevent_modalias(struct device *dev,
                                                                ^
   1 error generated.
--
>> drivers/tty/serdev/core.c:51:35: error: passing 'const struct device *' to parameter of type 'struct device *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
           rc = acpi_device_uevent_modalias(dev, env);
                                            ^~~
   include/linux/acpi.h:951:62: note: passing argument to parameter 'dev' here
   static inline int acpi_device_uevent_modalias(struct device *dev,
                                                                ^
   1 error generated.


vim +148 drivers/i2c/i2c-core-base.c

^1da177e4c3f41 drivers/i2c/i2c-core.c      Linus Torvalds           2005-04-16  138  
f01cf8eb19cb72 drivers/i2c/i2c-core-base.c Greg Kroah-Hartman       2022-09-29  139  static int i2c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
7b4fbc50fabb81 drivers/i2c/i2c-core.c      David Brownell           2007-05-01  140  {
f01cf8eb19cb72 drivers/i2c/i2c-core-base.c Greg Kroah-Hartman       2022-09-29  141  	const struct i2c_client *client = to_i2c_client(dev);
8c4ff6d0094a16 drivers/i2c/i2c-core.c      Zhang Rui                2014-01-14  142  	int rc;
8c4ff6d0094a16 drivers/i2c/i2c-core.c      Zhang Rui                2014-01-14  143  
af503716ac1444 drivers/i2c/i2c-core-base.c Javier Martinez Canillas 2017-12-03  144  	rc = of_device_uevent_modalias(dev, env);
af503716ac1444 drivers/i2c/i2c-core-base.c Javier Martinez Canillas 2017-12-03  145  	if (rc != -ENODEV)
af503716ac1444 drivers/i2c/i2c-core-base.c Javier Martinez Canillas 2017-12-03  146  		return rc;
af503716ac1444 drivers/i2c/i2c-core-base.c Javier Martinez Canillas 2017-12-03  147  
8c4ff6d0094a16 drivers/i2c/i2c-core.c      Zhang Rui                2014-01-14 @148  	rc = acpi_device_uevent_modalias(dev, env);
8c4ff6d0094a16 drivers/i2c/i2c-core.c      Zhang Rui                2014-01-14  149  	if (rc != -ENODEV)
8c4ff6d0094a16 drivers/i2c/i2c-core.c      Zhang Rui                2014-01-14  150  		return rc;
7b4fbc50fabb81 drivers/i2c/i2c-core.c      David Brownell           2007-05-01  151  
8dcf32175b4e18 drivers/i2c/i2c-core.c      Wolfram Sang             2016-03-23  152  	return add_uevent_var(env, "MODALIAS=%s%s", I2C_MODULE_PREFIX, client->name);
7b4fbc50fabb81 drivers/i2c/i2c-core.c      David Brownell           2007-05-01  153  }
7b4fbc50fabb81 drivers/i2c/i2c-core.c      David Brownell           2007-05-01  154  

:::::: The code at line 148 was first introduced by commit
:::::: 8c4ff6d0094a16809a7ecdd49d71cf06b0a51326 ACPI: fix module autoloading for ACPI enumerated devices

:::::: TO: Zhang Rui <rui.zhang@...el.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ