From: kernel test robot <lkp@intel.com>
To: Gao Xiang <hsiangkao@aol.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: fs/erofs/zdata.c:198:22: sparse: sparse: non size-preserving integer to pointer cast
Date: Fri, 7 Aug 2020 20:08:10 +0800 [thread overview]
Message-ID: <202008072005.Myrby1lg%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6474 bytes --]
Hi Gao,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 86cfccb66937dd6cbf26ed619958b9e587e6a115
commit: 47e4937a4a7ca4184fd282791dfee76c6799966a erofs: move erofs out of staging
date: 12 months ago
config: s390-randconfig-s032-20200807 (attached as .config)
compiler: s390-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.2-118-ge1578773-dirty
git checkout 47e4937a4a7ca4184fd282791dfee76c6799966a
# 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__' ARCH=s390
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 >>)
>> fs/erofs/zdata.c:198:22: sparse: sparse: non size-preserving integer to pointer cast
fs/erofs/zdata.c:282:22: sparse: sparse: non size-preserving integer to pointer cast
fs/erofs/zdata.c:1094:24: sparse: sparse: non size-preserving integer to pointer cast
vim +198 fs/erofs/zdata.c
3883a79abd0227 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 162
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 163 static void preload_compressed_pages(struct z_erofs_collector *clt,
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 164 struct address_space *mc,
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 165 enum z_erofs_cache_alloctype type,
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 166 struct list_head *pagepool)
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 167 {
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 168 const struct z_erofs_pcluster *pcl = clt->pcl;
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 169 const unsigned int clusterpages = BIT(pcl->clusterbits);
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 170 struct page **pages = clt->compressedpages;
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 171 pgoff_t index = pcl->obj.index + (pages - pcl->compressed_pages);
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 172 bool standalone = true;
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 173
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 174 if (clt->mode < COLLECT_PRIMARY_FOLLOWED)
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 175 return;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 176
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 177 for (; pages < pcl->compressed_pages + clusterpages; ++pages) {
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 178 struct page *page;
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 179 compressed_page_t t;
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 180
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 181 /* the compressed page was loaded before */
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 182 if (READ_ONCE(*pages))
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 183 continue;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 184
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 185 page = find_get_page(mc, index);
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 186
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 187 if (page) {
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 188 t = tag_compressed_page_justfound(page);
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 189 } else if (type == DELAYEDALLOC) {
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 190 t = tagptr_init(compressed_page_t, PAGE_UNALLOCATED);
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 191 } else { /* DONTALLOC */
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 192 if (standalone)
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 193 clt->compressedpages = pages;
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 194 standalone = false;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 195 continue;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 196 }
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 197
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 @198 if (!cmpxchg_relaxed(pages, NULL, tagptr_cast_ptr(t)))
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 199 continue;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 200
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 201 if (page)
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 202 put_page(page);
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 203 }
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 204
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 205 if (standalone) /* downgrade to PRIMARY_FOLLOWED_NOINPLACE */
97e86a858bc360 drivers/staging/erofs/zdata.c Gao Xiang 2019-07-31 206 clt->mode = COLLECT_PRIMARY_FOLLOWED_NOINPLACE;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 207 }
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 208
:::::: The code at line 198 was first introduced by commit
:::::: 97e86a858bc360c9cded74ce9a06595d40f7ad81 staging: erofs: tidy up decompression frontend
:::::: TO: Gao Xiang <gaoxiang25@huawei.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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: 24253 bytes --]
next reply other threads:[~2020-08-07 12:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 12:08 kernel test robot [this message]
2020-08-07 14:48 ` Gao Xiang
2020-08-07 15:05 ` Luc Van Oostenryck
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=202008072005.Myrby1lg%lkp@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hsiangkao@aol.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®