From: kernel test robot <lkp@intel.com>
To: Vaibhav Jain <vaibhav@linux.ibm.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.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?
Date: Tue, 6 Jul 2021 19:58:00 +0800 [thread overview]
Message-ID: <202107061941.Tdf7f65U-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3949 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30975 bytes --]
reply other threads:[~2021-07-06 12:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202107061941.Tdf7f65U-lkp@intel.com \
--to=lkp@intel.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=vaibhav@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox