GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [ammarfaizi2-block:axboe/linux-block/for-6.3/block 148/148] block/blk-merge.c:984:42: sparse: sparse: incorrect type in initializer (different base types)
@ 2023-02-16 23:47 kernel test robot
  2023-02-17  2:52 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-02-16 23:47 UTC (permalink / raw)
  To: Ming Lei; +Cc: oe-kbuild-all, Ammar Faizi, GNU/Weeb Mailing List, Jens Axboe

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/for-6.3/block
head:   67205f80be9910207481406c47f7d85e703fb2e9
commit: 3481d9424950159b1dbd366a14acab79f1440bbf [148/148] block: sync mixed merged request's failfast with 1st bio's
config: openrisc-randconfig-s042-20230213 (https://download.01.org/0day-ci/archive/20230217/[email protected]/config)
compiler: or1k-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/3481d9424950159b1dbd366a14acab79f1440bbf
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block axboe/linux-block/for-6.3/block
        git checkout 3481d9424950159b1dbd366a14acab79f1440bbf
        # 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=openrisc 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=openrisc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> block/blk-merge.c:984:42: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted blk_opf_t const [usertype] ff @@     got unsigned int @@
   block/blk-merge.c:984:42: sparse:     expected restricted blk_opf_t const [usertype] ff
   block/blk-merge.c:984:42: sparse:     got unsigned int
   block/blk-merge.c:1010:42: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted blk_opf_t const [usertype] ff @@     got unsigned int @@
   block/blk-merge.c:1010:42: sparse:     expected restricted blk_opf_t const [usertype] ff
   block/blk-merge.c:1010:42: sparse:     got unsigned int
>> block/blk-merge.c:763:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
   block/blk-merge.c:763:24: sparse:     expected unsigned int
   block/blk-merge.c:763:24: sparse:     got restricted blk_opf_t
   block/blk-merge.c:765:28: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
   block/blk-merge.c:765:28: sparse:     expected unsigned int
   block/blk-merge.c:765:28: sparse:     got restricted blk_opf_t
>> block/blk-merge.c:763:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
   block/blk-merge.c:763:24: sparse:     expected unsigned int
   block/blk-merge.c:763:24: sparse:     got restricted blk_opf_t
   block/blk-merge.c:765:28: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
   block/blk-merge.c:765:28: sparse:     expected unsigned int
   block/blk-merge.c:765:28: sparse:     got restricted blk_opf_t

vim +984 block/blk-merge.c

   980	
   981	static enum bio_merge_status bio_attempt_back_merge(struct request *req,
   982			struct bio *bio, unsigned int nr_segs)
   983	{
 > 984		const blk_opf_t ff = bio_failfast(bio);
   985	
   986		if (!ll_back_merge_fn(req, bio, nr_segs))
   987			return BIO_MERGE_FAILED;
   988	
   989		trace_block_bio_backmerge(bio);
   990		rq_qos_merge(req->q, req, bio);
   991	
   992		if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff)
   993			blk_rq_set_mixed_merge(req);
   994	
   995		blk_update_mixed_merge(req, bio, false);
   996	
   997		req->biotail->bi_next = bio;
   998		req->biotail = bio;
   999		req->__data_len += bio->bi_iter.bi_size;
  1000	
  1001		bio_crypt_free_ctx(bio);
  1002	
  1003		blk_account_io_merge_bio(req);
  1004		return BIO_MERGE_OK;
  1005	}
  1006	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ammarfaizi2-block:axboe/linux-block/for-6.3/block 148/148] block/blk-merge.c:984:42: sparse: sparse: incorrect type in initializer (different base types)
  2023-02-16 23:47 [ammarfaizi2-block:axboe/linux-block/for-6.3/block 148/148] block/blk-merge.c:984:42: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
@ 2023-02-17  2:52 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2023-02-17  2:52 UTC (permalink / raw)
  To: kernel test robot, Ming Lei
  Cc: oe-kbuild-all, Ammar Faizi, GNU/Weeb Mailing List

On 2/16/23 4:47?PM, kernel test robot wrote:
> sparse warnings: (new ones prefixed by >>)
>>> block/blk-merge.c:984:42: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted blk_opf_t const [usertype] ff @@     got unsigned int @@
>    block/blk-merge.c:984:42: sparse:     expected restricted blk_opf_t const [usertype] ff
>    block/blk-merge.c:984:42: sparse:     got unsigned int
>    block/blk-merge.c:1010:42: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted blk_opf_t const [usertype] ff @@     got unsigned int @@
>    block/blk-merge.c:1010:42: sparse:     expected restricted blk_opf_t const [usertype] ff
>    block/blk-merge.c:1010:42: sparse:     got unsigned int
>>> block/blk-merge.c:763:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
>    block/blk-merge.c:763:24: sparse:     expected unsigned int
>    block/blk-merge.c:763:24: sparse:     got restricted blk_opf_t
>    block/blk-merge.c:765:28: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
>    block/blk-merge.c:765:28: sparse:     expected unsigned int
>    block/blk-merge.c:765:28: sparse:     got restricted blk_opf_t
>>> block/blk-merge.c:763:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
>    block/blk-merge.c:763:24: sparse:     expected unsigned int
>    block/blk-merge.c:763:24: sparse:     got restricted blk_opf_t
>    block/blk-merge.c:765:28: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted blk_opf_t @@
>    block/blk-merge.c:765:28: sparse:     expected unsigned int
>    block/blk-merge.c:765:28: sparse:     got restricted blk_opf_t

I fixed this up, thanks for the report.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-17  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 23:47 [ammarfaizi2-block:axboe/linux-block/for-6.3/block 148/148] block/blk-merge.c:984:42: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
2023-02-17  2:52 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox