[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206200524.TTdzNLDl-lkp@intel.com>
Date: Mon, 20 Jun 2022 05:27:02 +0800
From: kernel test robot <lkp@...el.com>
To: Bart Van Assche <bvanassche@....org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [bvanassche:block-bitwise-opf 15/15]
drivers/block/pktcdvd.c:1232:18: sparse: sparse: incorrect type in argument
5 (different base types)
tree: https://github.com/bvanassche/linux block-bitwise-opf
head: 031ccdd616b11c4e774e56aa7eae906188ab24cc
commit: 031ccdd616b11c4e774e56aa7eae906188ab24cc [15/15] block: Introduce the type blk_mq_opf_t
config: riscv-randconfig-s031-20220619 (https://download.01.org/0day-ci/archive/20220620/202206200524.TTdzNLDl-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.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.4-30-g92122700-dirty
# https://github.com/bvanassche/linux/commit/031ccdd616b11c4e774e56aa7eae906188ab24cc
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche block-bitwise-opf
git checkout 031ccdd616b11c4e774e56aa7eae906188ab24cc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/block/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/block/pktcdvd.c:1232:18: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted blk_mq_opf_t [usertype] opf @@ got int @@
drivers/block/pktcdvd.c:1232:18: sparse: expected restricted blk_mq_opf_t [usertype] opf
drivers/block/pktcdvd.c:1232:18: sparse: got int
--
>> drivers/block/zram/zram_drv.c:749:41: sparse: sparse: restricted blk_mq_opf_t degrades to integer
>> drivers/block/zram/zram_drv.c:749:39: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted blk_mq_opf_t [usertype] opf @@ got unsigned int @@
drivers/block/zram/zram_drv.c:749:39: sparse: expected restricted blk_mq_opf_t [usertype] opf
drivers/block/zram/zram_drv.c:749:39: sparse: got unsigned int
drivers/block/zram/zram_drv.c: note: in included file (through include/linux/list_bl.h, include/linux/rculist_bl.h, include/linux/dcache.h, ...):
include/linux/bit_spinlock.h:41:19: sparse: sparse: context imbalance in 'zram_slot_trylock' - different lock contexts for basic block
include/linux/bit_spinlock.h:35:9: sparse: sparse: context imbalance in 'zram_slot_lock' - wrong count at exit
include/linux/bit_spinlock.h:63:25: sparse: sparse: context imbalance in 'zram_slot_unlock' - unexpected unlock
vim +1232 drivers/block/pktcdvd.c
5f03414d4098b5 Christoph Hellwig 2021-04-12 1222
^1da177e4c3f41 Linus Torvalds 2005-04-16 1223 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 1224 * Assemble a bio to write one packet and queue the bio for processing
^1da177e4c3f41 Linus Torvalds 2005-04-16 1225 * by the underlying block device.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1226 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1227 static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1228 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1229 int f;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1230
852ad96cb03621 Christoph Hellwig 2022-04-06 1231 bio_init(pkt->w_bio, pd->bdev, pkt->w_bio->bi_inline_vecs, pkt->frames,
852ad96cb03621 Christoph Hellwig 2022-04-06 @1232 REQ_OP_WRITE);
4f024f3797c43c Kent Overstreet 2013-10-11 1233 pkt->w_bio->bi_iter.bi_sector = pkt->sector;
ffb25dc60ff14f Kent Overstreet 2012-09-04 1234 pkt->w_bio->bi_end_io = pkt_end_io_packet_write;
ffb25dc60ff14f Kent Overstreet 2012-09-04 1235 pkt->w_bio->bi_private = pkt;
ffb25dc60ff14f Kent Overstreet 2012-09-04 1236
ffb25dc60ff14f Kent Overstreet 2012-09-04 1237 /* XXX: locking? */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1238 for (f = 0; f < pkt->frames; f++) {
feebd568725775 Christoph Hellwig 2016-10-27 1239 struct page *page = pkt->pages[(f * CD_FRAMESIZE) / PAGE_SIZE];
feebd568725775 Christoph Hellwig 2016-10-27 1240 unsigned offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
feebd568725775 Christoph Hellwig 2016-10-27 1241
feebd568725775 Christoph Hellwig 2016-10-27 1242 if (!bio_add_page(pkt->w_bio, page, CD_FRAMESIZE, offset))
ffb25dc60ff14f Kent Overstreet 2012-09-04 1243 BUG();
^1da177e4c3f41 Linus Torvalds 2005-04-16 1244 }
844aa7974395df Joe Perches 2013-09-11 1245 pkt_dbg(2, pd, "vcnt=%d\n", pkt->w_bio->bi_vcnt);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1246
^1da177e4c3f41 Linus Torvalds 2005-04-16 1247 /*
72772323746805 Peter Osterlund 2006-02-14 1248 * Fill-in bvec with data from orig_bios.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1249 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1250 spin_lock(&pkt->lock);
45db54d58de0b7 Kent Overstreet 2018-05-08 1251 bio_list_copy_data(pkt->w_bio, pkt->orig_bios.head);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1252
^1da177e4c3f41 Linus Torvalds 2005-04-16 1253 pkt_set_state(pkt, PACKET_WRITE_WAIT_STATE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1254 spin_unlock(&pkt->lock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1255
844aa7974395df Joe Perches 2013-09-11 1256 pkt_dbg(2, pd, "Writing %d frames for zone %llx\n",
ffb25dc60ff14f Kent Overstreet 2012-09-04 1257 pkt->write_size, (unsigned long long)pkt->sector);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1258
feebd568725775 Christoph Hellwig 2016-10-27 1259 if (test_bit(PACKET_MERGE_SEGS, &pd->flags) || (pkt->write_size < pkt->frames))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1260 pkt->cache_valid = 1;
feebd568725775 Christoph Hellwig 2016-10-27 1261 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 1262 pkt->cache_valid = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1263
^1da177e4c3f41 Linus Torvalds 2005-04-16 1264 /* Start the write request */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1265 atomic_set(&pkt->io_wait, 1);
46c271bedd2c84 Peter Osterlund 2005-06-23 1266 pkt_queue_bio(pd, pkt->w_bio);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1267 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1268
:::::: The code at line 1232 was first introduced by commit
:::::: 852ad96cb03621f7995764b4b31cbff9801d8bcd pktcdvd: stop using bio_reset
:::::: TO: Christoph Hellwig <hch@....de>
:::::: CC: Jens Axboe <axboe@...nel.dk>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists