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]
Date:   Tue, 6 Jul 2021 19:58:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vaibhav Jain <vaibhav@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Michael Ellerman <mpe@...erman.id.au>,
        "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Subject: arch/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@...el.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

Download attachment ".config.gz" of type "application/gzip" (30975 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ