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: <202209300106.PgLsyv4F-lkp@intel.com>
Date:   Fri, 30 Sep 2022 01:51:55 +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 12/18]
 drivers/i2c/i2c-core-base.c:148:42: warning: passing argument 1 of
 'acpi_device_uevent_modalias' discards 'const' qualifier from pointer target
 type

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: m68k-allyesconfig
compiler: m68k-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=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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/i2c/i2c-core-base.c: In function 'i2c_device_uevent':
>> drivers/i2c/i2c-core-base.c:148:42: warning: passing argument 1 of 'acpi_device_uevent_modalias' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     148 |         rc = acpi_device_uevent_modalias(dev, env);
         |                                          ^~~
   In file included from drivers/i2c/i2c-core-base.c:16:
   include/linux/acpi.h:951:62: note: expected 'struct device *' but argument is of type 'const struct device *'
     951 | static inline int acpi_device_uevent_modalias(struct device *dev,
         |                                               ~~~~~~~~~~~~~~~^~~
--
   drivers/tty/serdev/core.c: In function 'serdev_device_uevent':
>> drivers/tty/serdev/core.c:51:42: warning: passing argument 1 of 'acpi_device_uevent_modalias' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      51 |         rc = acpi_device_uevent_modalias(dev, env);
         |                                          ^~~
   In file included from drivers/tty/serdev/core.c:9:
   include/linux/acpi.h:951:62: note: expected 'struct device *' but argument is of type 'const struct device *'
     951 | static inline int acpi_device_uevent_modalias(struct device *dev,
         |                                               ~~~~~~~~~~~~~~~^~~


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" (279524 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ