From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [dhowells-fs:netfs-folio-regions 18/28] fs/netfs/write_prep.c:78:31: sparse: sparse: incompatible types in comparison expression (different type sizes):
Date: Fri, 20 Aug 2021 05:14:20 +0800 [thread overview]
Message-ID: <202108200514.l0pWx8hb-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3343 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions
head: 215a4ee495a95cc73256ed76f91cb78bcabd6b8e
commit: 0c1c1796fd33fded73a9a4305a9e43e8922746ee [18/28] netfs: Do encryption in write preparatory phase
config: nios2-randconfig-s031-20210818 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=0c1c1796fd33fded73a9a4305a9e43e8922746ee
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs netfs-folio-regions
git checkout 0c1c1796fd33fded73a9a4305a9e43e8922746ee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash fs/netfs/
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/netfs/write_prep.c:78:31: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> fs/netfs/write_prep.c:78:31: sparse: unsigned int *
>> fs/netfs/write_prep.c:78:31: sparse: unsigned long *
vim +78 fs/netfs/write_prep.c
46
47 /*
48 * Populate a scatterlist from folios in an xarray.
49 */
50 static int netfs_xarray_to_sglist(struct xarray *xa, loff_t pos, size_t len,
51 struct scatterlist *sg, unsigned int n_sg)
52 {
53 struct scatterlist *p = sg;
54 struct folio *folio = NULL;
55 size_t seg, offset, skip = 0;
56 loff_t start = pos;
57 pgoff_t index = start >> PAGE_SHIFT;
58 int j;
59
60 XA_STATE(xas, xa, index);
61
62 sg_init_table(sg, n_sg);
63
64 rcu_read_lock();
65
66 xas_for_each(&xas, folio, ULONG_MAX) {
67 kdebug("LOAD %lx %px", folio->index, folio);
68 if (xas_retry(&xas, folio))
69 continue;
70 if (WARN_ON(xa_is_value(folio)) || WARN_ON(folio_test_hugetlb(folio)))
71 break;
72 for (j = (folio_index(folio) < index) ? index - folio_index(folio) : 0;
73 j < folio_nr_pages(folio); j++
74 ) {
75 struct page *subpage = folio_file_page(folio, j);
76
77 offset = (pos + skip) & ~PAGE_MASK;
> 78 seg = min(len, PAGE_SIZE - offset);
79
80 kdebug("[%zx] %lx %zx @%zx", p - sg, subpage->index, seg, offset);
81 sg_set_page(p++, subpage, seg, offset);
82
83 len -= seg;
84 skip += seg;
85 if (len == 0)
86 break;
87 }
88 if (len == 0)
89 break;
90 }
91
92 rcu_read_unlock();
93 if (len > 0) {
94 WARN_ON(len > 0);
95 return -EIO;
96 }
97
98 sg_mark_end(p - 1);
99 kleave(" = %zd", p - sg);
100 return p - sg;
101 }
102
---
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: 24479 bytes --]
reply other threads:[~2021-08-19 21:14 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=202108200514.l0pWx8hb-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.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;
as well as URLs for NNTP newsgroup(s).