[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210010944.4bCpNZgc-lkp@intel.com>
Date: Sat, 1 Oct 2022 09:18:02 +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 15/18] drivers/nvdimm/bus.c:37:28:
sparse: sparse: incorrect type in argument 1 (different modifiers)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head: b3fd2c1b72aa7f7a66de071d625c3702f705edf7
commit: 50a40710ce9ffdc860cd60c3d797388781b6fd2e [15/18] driver core: make struct bus_type.uevent() take a const *
config: s390-randconfig-s052-20220925
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=50a40710ce9ffdc860cd60c3d797388781b6fd2e
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 50a40710ce9ffdc860cd60c3d797388781b6fd2e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash drivers/nvdimm/ drivers/s390/cio/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/nvdimm/bus.c:37:28: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct device *dev @@ got struct device const *dev @@
drivers/nvdimm/bus.c:37:28: sparse: expected struct device *dev
drivers/nvdimm/bus.c:37:28: sparse: got struct device const *dev
--
>> drivers/s390/cio/device.c:133:59: sparse: sparse: incorrect type in argument 3 (different modifiers) @@ expected struct ccw_device_id *id @@ got struct ccw_device_id const *id @@
drivers/s390/cio/device.c:133:59: sparse: expected struct ccw_device_id *id
drivers/s390/cio/device.c:133:59: sparse: got struct ccw_device_id const *id
vim +37 drivers/nvdimm/bus.c
45def22c1fab85 Dan Williams 2015-04-26 30
50a40710ce9ffd Greg Kroah-Hartman 2022-09-29 31 static int to_nd_device_type(const struct device *dev)
4d88a97aa9e8cf Dan Williams 2015-05-31 32 {
4d88a97aa9e8cf Dan Williams 2015-05-31 33 if (is_nvdimm(dev))
4d88a97aa9e8cf Dan Williams 2015-05-31 34 return ND_DEVICE_DIMM;
c9e582aa689f54 Dan Williams 2017-05-29 35 else if (is_memory(dev))
3d88002e4a7bd4 Dan Williams 2015-05-31 36 return ND_DEVICE_REGION_PMEM;
cd03412a51ac4c Dan Williams 2016-03-11 @37 else if (is_nd_dax(dev))
cd03412a51ac4c Dan Williams 2016-03-11 38 return ND_DEVICE_DAX_PMEM;
c9e582aa689f54 Dan Williams 2017-05-29 39 else if (is_nd_region(dev->parent))
3d88002e4a7bd4 Dan Williams 2015-05-31 40 return nd_region_to_nstype(to_nd_region(dev->parent));
4d88a97aa9e8cf Dan Williams 2015-05-31 41
4d88a97aa9e8cf Dan Williams 2015-05-31 42 return 0;
4d88a97aa9e8cf Dan Williams 2015-05-31 43 }
4d88a97aa9e8cf Dan Williams 2015-05-31 44
:::::: The code at line 37 was first introduced by commit
:::::: cd03412a51ac4cb3001a8cdfae4560c9602f3387 libnvdimm, dax: introduce device-dax infrastructure
:::::: TO: Dan Williams <dan.j.williams@...el.com>
:::::: CC: Dan Williams <dan.j.williams@...el.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (165019 bytes)
Powered by blists - more mailing lists