* [hch-block:bvec-kmap 49/49] drivers/block/floppy.c:2489:33: error: incompatible pointer types passing 'struct page **' to parameter of type 'struct bio_vec *'
@ 2021-05-23 9:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-23 9:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4748 bytes --]
tree: git://git.infradead.org/users/hch/block.git bvec-kmap
head: 60857617af49088613b68d16c6164ad671a81517
commit: 60857617af49088613b68d16c6164ad671a81517 [49/49] floppy: use memcpy_{to,from}_bvec
config: x86_64-randconfig-a003-20210523 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b4fd512c36ca344a3ff69350219e8b0a67e9472a)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-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 60857617af49088613b68d16c6164ad671a81517
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/block/floppy.c:2489:33: error: incompatible pointer types passing 'struct page **' to parameter of type 'struct bio_vec *' [-Werror,-Wincompatible-pointer-types]
memcpy_from_bvec(dma_buffer, &bv.bv_page);
^~~~~~~~~~~
include/linux/bvec.h:197:63: note: passing argument to parameter 'bvec' here
static inline void memcpy_from_bvec(char *to, struct bio_vec *bvec)
^
1 error generated.
vim +2489 drivers/block/floppy.c
2424
2425 /*
2426 * Move data from/to the track buffer to/from the buffer cache.
2427 */
2428 static void copy_buffer(int ssize, int max_sector, int max_sector_2)
2429 {
2430 int remaining; /* number of transferred 512-byte sectors */
2431 struct bio_vec bv;
2432 char *dma_buffer;
2433 int size;
2434 struct req_iterator iter;
2435
2436 max_sector = transfer_size(ssize,
2437 min(max_sector, max_sector_2),
2438 blk_rq_sectors(current_req));
2439
2440 if (current_count_sectors <= 0 && CT(raw_cmd->cmd[COMMAND]) == FD_WRITE &&
2441 buffer_max > fsector_t + blk_rq_sectors(current_req))
2442 current_count_sectors = min_t(int, buffer_max - fsector_t,
2443 blk_rq_sectors(current_req));
2444
2445 remaining = current_count_sectors << 9;
2446 if (remaining > blk_rq_bytes(current_req) && CT(raw_cmd->cmd[COMMAND]) == FD_WRITE) {
2447 DPRINT("in copy buffer\n");
2448 pr_info("current_count_sectors=%ld\n", current_count_sectors);
2449 pr_info("remaining=%d\n", remaining >> 9);
2450 pr_info("current_req->nr_sectors=%u\n",
2451 blk_rq_sectors(current_req));
2452 pr_info("current_req->current_nr_sectors=%u\n",
2453 blk_rq_cur_sectors(current_req));
2454 pr_info("max_sector=%d\n", max_sector);
2455 pr_info("ssize=%d\n", ssize);
2456 }
2457
2458 buffer_max = max(max_sector, buffer_max);
2459
2460 dma_buffer = floppy_track_buffer + ((fsector_t - buffer_min) << 9);
2461
2462 size = blk_rq_cur_bytes(current_req);
2463
2464 rq_for_each_segment(bv, current_req, iter) {
2465 if (!remaining)
2466 break;
2467
2468 size = bv.bv_len;
2469 SUPBOUND(size, remaining);
2470 if (dma_buffer + size >
2471 floppy_track_buffer + (max_buffer_sectors << 10) ||
2472 dma_buffer < floppy_track_buffer) {
2473 DPRINT("buffer overrun in copy buffer %d\n",
2474 (int)((floppy_track_buffer - dma_buffer) >> 9));
2475 pr_info("fsector_t=%d buffer_min=%d\n",
2476 fsector_t, buffer_min);
2477 pr_info("current_count_sectors=%ld\n",
2478 current_count_sectors);
2479 if (CT(raw_cmd->cmd[COMMAND]) == FD_READ)
2480 pr_info("read\n");
2481 if (CT(raw_cmd->cmd[COMMAND]) == FD_WRITE)
2482 pr_info("write\n");
2483 break;
2484 }
2485
2486 if (CT(raw_cmd->cmd[COMMAND]) == FD_READ)
2487 memcpy_to_bvec(&bv, dma_buffer);
2488 else
> 2489 memcpy_from_bvec(dma_buffer, &bv.bv_page);
2490
2491 remaining -= size;
2492 dma_buffer += size;
2493 }
2494 if (remaining) {
2495 if (remaining > 0)
2496 max_sector -= remaining >> 9;
2497 DPRINT("weirdness: remaining %d\n", remaining >> 9);
2498 }
2499 }
2500
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37884 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-23 9:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 9:02 [hch-block:bvec-kmap 49/49] drivers/block/floppy.c:2489:33: error: incompatible pointer types passing 'struct page **' to parameter of type 'struct bio_vec *' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.