lkml.org 
[lkml]   [2021]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/powerpc/platforms/pseries/papr_scm.c:934:1: sparse: sparse: symbol 'dev_attr_dirty_shutdown' was not declared. Should it be static?
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 79160a603bdb51916226caf4a6616cc4e1c58a58
commit: de21e1377c4fe65bfd8d31e446482c1bc2232997 powerpc/papr_scm: Add support for reporting dirty-shutdown-count
date: 11 days ago
config: powerpc-randconfig-s031-20210706 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=de21e1377c4fe65bfd8d31e446482c1bc2232997
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout de21e1377c4fe65bfd8d31e446482c1bc2232997
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/platforms/pseries/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
arch/powerpc/platforms/pseries/papr_scm.c:434:69: sparse: sparse: cast to restricted __be64
arch/powerpc/platforms/pseries/papr_scm.c:437:69: sparse: sparse: cast to restricted __be32
arch/powerpc/platforms/pseries/papr_scm.c:441:69: sparse: sparse: cast to restricted __be16
arch/powerpc/platforms/pseries/papr_scm.c:476:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be64 [assigned] [usertype] data_be @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/pseries/papr_scm.c:476:33: sparse: expected restricted __be64 [assigned] [usertype] data_be
arch/powerpc/platforms/pseries/papr_scm.c:476:33: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/pseries/papr_scm.c:481:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be64 [assigned] [usertype] data_be @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/pseries/papr_scm.c:481:33: sparse: expected restricted __be64 [assigned] [usertype] data_be
arch/powerpc/platforms/pseries/papr_scm.c:481:33: sparse: got restricted __be16 [usertype]
arch/powerpc/platforms/pseries/papr_scm.c:484:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be64 [assigned] [usertype] data_be @@ got unsigned char [usertype] @@
arch/powerpc/platforms/pseries/papr_scm.c:484:33: sparse: expected restricted __be64 [assigned] [usertype] data_be
arch/powerpc/platforms/pseries/papr_scm.c:484:33: sparse: got unsigned char [usertype]
arch/powerpc/platforms/pseries/papr_scm.c:485:33: sparse: sparse: invalid assignment: &=
arch/powerpc/platforms/pseries/papr_scm.c:485:33: sparse: left side has type restricted __be64
arch/powerpc/platforms/pseries/papr_scm.c:485:33: sparse: right side has type int
>> arch/powerpc/platforms/pseries/papr_scm.c:934:1: sparse: sparse: symbol 'dev_attr_dirty_shutdown' was not declared. Should it be static?

vim +/dev_attr_dirty_shutdown +934 arch/powerpc/platforms/pseries/papr_scm.c

925
926 static ssize_t dirty_shutdown_show(struct device *dev,
927 struct device_attribute *attr, char *buf)
928 {
929 struct nvdimm *dimm = to_nvdimm(dev);
930 struct papr_scm_priv *p = nvdimm_provider_data(dimm);
931
932 return sysfs_emit(buf, "%llu\n", p->dirty_shutdown_counter);
933 }
> 934 DEVICE_ATTR_RO(dirty_shutdown);
935

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-07-06 14:26    [W:0.079 / U:1.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site