tree: https://github.com/ammarfaizi2/linux-block axboe/linux-block/perf-wip.2 head: 53c6dc373fcb6f58ae3dcda07c99fc1e70e1c923 commit: a377b58a5e225a2a0336956fd2442e8b2f023172 [1/14] block: optimise blk_may_split for normal rw config: nios2-randconfig-s043-20221218 compiler: nios2-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty # https://github.com/ammarfaizi2/linux-block/commit/a377b58a5e225a2a0336956fd2442e8b2f023172 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block axboe/linux-block/perf-wip.2 git checkout a377b58a5e225a2a0336956fd2442e8b2f023172 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) block/blk-merge.c: note: in included file: >> block/blk.h:298:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int op @@ got restricted blk_opf_t enum req_op @@ block/blk.h:298:33: sparse: expected unsigned int op block/blk.h:298:33: sparse: got restricted blk_opf_t enum req_op >> block/blk.h:300:19: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:300:40: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:300:62: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:302:22: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:303:22: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:304:22: sparse: sparse: restricted blk_opf_t degrades to integer -- block/blk-mq.c: note: in included file: >> block/blk.h:298:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int op @@ got restricted blk_opf_t enum req_op @@ block/blk.h:298:33: sparse: expected unsigned int op block/blk.h:298:33: sparse: got restricted blk_opf_t enum req_op >> block/blk.h:300:19: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:300:40: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:300:62: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:302:22: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:303:22: sparse: sparse: restricted blk_opf_t degrades to integer block/blk.h:304:22: sparse: sparse: restricted blk_opf_t degrades to integer vim +298 block/blk.h 280 281 ssize_t part_size_show(struct device *dev, struct device_attribute *attr, 282 char *buf); 283 ssize_t part_stat_show(struct device *dev, struct device_attribute *attr, 284 char *buf); 285 ssize_t part_inflight_show(struct device *dev, struct device_attribute *attr, 286 char *buf); 287 ssize_t part_fail_show(struct device *dev, struct device_attribute *attr, 288 char *buf); 289 ssize_t part_fail_store(struct device *dev, struct device_attribute *attr, 290 const char *buf, size_t count); 291 ssize_t part_timeout_show(struct device *, struct device_attribute *, char *); 292 ssize_t part_timeout_store(struct device *, struct device_attribute *, 293 const char *, size_t); 294 295 static inline bool bio_may_exceed_limits(struct bio *bio, 296 const struct queue_limits *lim) 297 { > 298 unsigned int op = bio_op(bio); 299 > 300 if (op != REQ_OP_READ && op != REQ_OP_WRITE && op != REQ_OP_FLUSH) { 301 switch (op) { 302 case REQ_OP_DISCARD: 303 case REQ_OP_SECURE_ERASE: 304 case REQ_OP_WRITE_ZEROES: 305 return true; /* non-trivial splitting decisions */ 306 default: 307 break; 308 } 309 } 310 311 /* 312 * All drivers must accept single-segments bios that are <= PAGE_SIZE. 313 * This is a quick and dirty check that relies on the fact that 314 * bi_io_vec[0] is always valid if a bio has data. The check might 315 * lead to occasional false negatives when bios are cloned, but compared 316 * to the performance impact of cloned bios themselves the loop below 317 * doesn't matter anyway. 318 */ 319 return lim->chunk_sectors || bio->bi_vcnt != 1 || 320 bio->bi_io_vec->bv_len + bio->bi_io_vec->bv_offset > PAGE_SIZE; 321 } 322 -- 0-DAY CI Kernel Test Service https://01.org/lkp