tree:
git://git.infradead.org/users/hch/block.git bvec-kmap
head: dcf9fd7b54aa00cdd89251aebaa3cc713f035e26
commit: 16a8596288c6b9cb513472678d066a021314a9f7 [34/46] block: use memcpy_from_page and
bvec_virt in __blk_queue_bounce
config: mips-randconfig-r004-20210522 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
e84a9b9bb3051c35dea993cdad7b3d2575638f85)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add hch-block
git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block bvec-kmap
git checkout 16a8596288c6b9cb513472678d066a021314a9f7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> block/bounce.c:255:34: warning: incompatible pointer to integer
conversion passing 'struct page *' to parameter of type 'size_t' (aka
'unsigned int') [-Wint-conversion]
memcpy_to_page(bvec_virt(to), page, to->bv_offset,
^~~~
include/linux/highmem.h:325:61: note: passing argument to parameter 'offset'
here
static inline void memcpy_to_page(struct page *page, size_t offset,
^
> block/bounce.c:255:40: warning: incompatible integer to pointer
conversion passing 'unsigned int' to parameter of type 'const char *'
[-Wint-conversion]
memcpy_to_page(bvec_virt(to), page,
to->bv_offset,
^~~~~~~~~~~~~
include/linux/highmem.h:326:19: note: passing argument to parameter 'from'
here
const char *from, size_t len)
^
2 warnings generated.
vim +255 block/bounce.c
212
213 void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig)
214 {
215 struct bio *bio;
216 int rw = bio_data_dir(*bio_orig);
217 struct bio_vec *to, from;
218 struct bvec_iter iter;
219 unsigned i = 0;
220 bool bounce = false;
221 int sectors = 0;
222
223 bio_for_each_segment(from, *bio_orig, iter) {
224 if (i++ < BIO_MAX_VECS)
225 sectors += from.bv_len >> 9;
226 if (PageHighMem(from.bv_page))
227 bounce = true;
228 }
229 if (!bounce)
230 return;
231
232 if (sectors < bio_sectors(*bio_orig)) {
233 bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split);
234 bio_chain(bio, *bio_orig);
235 submit_bio_noacct(*bio_orig);
236 *bio_orig = bio;
237 }
238 bio = bounce_clone_bio(*bio_orig);
239
240 /*
241 * Bvec table can't be updated by bio_for_each_segment_all(),
242 * so retrieve bvec from the table directly. This way is safe
243 * because the 'bio' is single-page bvec.
244 */
245 for (i = 0, to = bio->bi_io_vec; i < bio->bi_vcnt; to++, i++) {
246 struct page *page = to->bv_page;
247
248 if (!PageHighMem(page))
249 continue;
250
251 to->bv_page = mempool_alloc(&page_pool, GFP_NOIO);
252 inc_zone_page_state(to->bv_page, NR_BOUNCE);
253
254 if (rw == WRITE)
255 memcpy_to_page(bvec_virt(to), page, to->bv_offset,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org