linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types)
@ 2022-05-27 20:46 kernel test robot
  2022-05-27 21:18 ` Logan Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-05-27 20:46 UTC (permalink / raw)
  To: Logan Gunthorpe; +Cc: kbuild-all, linux-kernel, Song Liu, Christoph Hellwig

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7e284070abe53d448517b80493863595af4ab5f0
commit: b0920ede081b3f1659872f80ce552305610675a6 md/raid5: Add __rcu annotation to struct disk_info
date:   5 weeks ago
config: csky-randconfig-s032-20220524 (https://download.01.org/0day-ci/archive/20220528/202205280426.NVpnRyuP-lkp@intel.com/config)
compiler: csky-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-14-g5a0004b5-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0920ede081b3f1659872f80ce552305610675a6
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b0920ede081b3f1659872f80ce552305610675a6
        # 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=csky SHELL=/bin/bash drivers/md/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   drivers/md/raid5-ppl.c: note: in included file:
   drivers/md/raid5.h:271:14: sparse: sparse: array of flexible structures
>> drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned int opf @@     got restricted gfp_t [usertype] @@
   drivers/md/raid5-ppl.c:632:57: sparse:     expected unsigned int opf
   drivers/md/raid5-ppl.c:632:57: sparse:     got restricted gfp_t [usertype]
>> drivers/md/raid5-ppl.c:633:61: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted gfp_t [usertype] gfp_mask @@     got unsigned long long @@
   drivers/md/raid5-ppl.c:633:61: sparse:     expected restricted gfp_t [usertype] gfp_mask
   drivers/md/raid5-ppl.c:633:61: sparse:     got unsigned long long
   drivers/md/raid5-ppl.c:886:30: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct md_rdev *rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
   drivers/md/raid5-ppl.c:886:30: sparse:     expected struct md_rdev *rdev
   drivers/md/raid5-ppl.c:886:30: sparse:     got struct md_rdev [noderef] __rcu *rdev
   drivers/md/raid5-ppl.c:937:29: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct md_rdev *parity_rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
   drivers/md/raid5-ppl.c:937:29: sparse:     expected struct md_rdev *parity_rdev
   drivers/md/raid5-ppl.c:937:29: sparse:     got struct md_rdev [noderef] __rcu *rdev
   drivers/md/raid5-ppl.c:1407:54: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct md_rdev *rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
   drivers/md/raid5-ppl.c:1407:54: sparse:     expected struct md_rdev *rdev
   drivers/md/raid5-ppl.c:1407:54: sparse:     got struct md_rdev [noderef] __rcu *rdev

vim +632 drivers/md/raid5-ppl.c

1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  607  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  608  static void ppl_do_flush(struct ppl_io_unit *io)
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  609  {
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  610  	struct ppl_log *log = io->log;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  611  	struct ppl_conf *ppl_conf = log->ppl_conf;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  612  	struct r5conf *conf = ppl_conf->mddev->private;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  613  	int raid_disks = conf->raid_disks;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  614  	int flushed_disks = 0;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  615  	int i;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  616  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  617  	atomic_set(&io->pending_flushes, raid_disks);
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  618  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  619  	for_each_set_bit(i, &log->disk_flush_bitmap, raid_disks) {
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  620  		struct md_rdev *rdev;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  621  		struct block_device *bdev = NULL;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  622  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  623  		rcu_read_lock();
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  624  		rdev = rcu_dereference(conf->disks[i].rdev);
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  625  		if (rdev && !test_bit(Faulty, &rdev->flags))
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  626  			bdev = rdev->bdev;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  627  		rcu_read_unlock();
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  628  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  629  		if (bdev) {
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  630  			struct bio *bio;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  631  
609be1066731fe Christoph Hellwig 2022-01-24 @632  			bio = bio_alloc_bioset(bdev, 0, GFP_NOIO,
609be1066731fe Christoph Hellwig 2022-01-24 @633  					       REQ_OP_WRITE | REQ_PREFLUSH,
609be1066731fe Christoph Hellwig 2022-01-24  634  					       &ppl_conf->flush_bs);
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  635  			bio->bi_private = io;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  636  			bio->bi_end_io = ppl_flush_endio;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  637  
c7dec4623c9cde Christoph Hellwig 2022-03-04  638  			pr_debug("%s: dev: %ps\n", __func__, bio->bi_bdev);
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  639  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  640  			submit_bio(bio);
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  641  			flushed_disks++;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  642  		}
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  643  	}
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  644  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  645  	log->disk_flush_bitmap = 0;
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  646  
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  647  	for (i = flushed_disks ; i < raid_disks; i++) {
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  648  		if (atomic_dec_and_test(&io->pending_flushes))
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  649  			ppl_io_unit_finished(io);
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  650  	}
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  651  }
1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  652  

:::::: The code at line 632 was first introduced by commit
:::::: 609be1066731fea86436f5f91022f82e592ab456 block: pass a block_device and opf to bio_alloc_bioset

:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: Jens Axboe <axboe@kernel.dk>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types)
  2022-05-27 20:46 drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types) kernel test robot
@ 2022-05-27 21:18 ` Logan Gunthorpe
  2022-05-31  9:41   ` [kbuild-all] " Chen, Rong A
  0 siblings, 1 reply; 3+ messages in thread
From: Logan Gunthorpe @ 2022-05-27 21:18 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel, Song Liu, Christoph Hellwig



On 2022-05-27 14:46, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   7e284070abe53d448517b80493863595af4ab5f0
> commit: b0920ede081b3f1659872f80ce552305610675a6 md/raid5: Add __rcu annotation to struct disk_info
> date:   5 weeks ago
> config: csky-randconfig-s032-20220524 (https://download.01.org/0day-ci/archive/20220528/202205280426.NVpnRyuP-lkp@intel.com/config)
> compiler: csky-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-14-g5a0004b5-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0920ede081b3f1659872f80ce552305610675a6
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout b0920ede081b3f1659872f80ce552305610675a6
>         # 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=csky SHELL=/bin/bash drivers/md/
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
>    drivers/md/raid5-ppl.c: note: in included file:
>    drivers/md/raid5.h:271:14: sparse: sparse: array of flexible structures
>>> drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned int opf @@     got restricted gfp_t [usertype] @@
>    drivers/md/raid5-ppl.c:632:57: sparse:     expected unsigned int opf
>    drivers/md/raid5-ppl.c:632:57: sparse:     got restricted gfp_t [usertype]
>>> drivers/md/raid5-ppl.c:633:61: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted gfp_t [usertype] gfp_mask @@     got unsigned long long @@
>    drivers/md/raid5-ppl.c:633:61: sparse:     expected restricted gfp_t [usertype] gfp_mask
>    drivers/md/raid5-ppl.c:633:61: sparse:     got unsigned long long
>    drivers/md/raid5-ppl.c:886:30: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct md_rdev *rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
>    drivers/md/raid5-ppl.c:886:30: sparse:     expected struct md_rdev *rdev
>    drivers/md/raid5-ppl.c:886:30: sparse:     got struct md_rdev [noderef] __rcu *rdev
>    drivers/md/raid5-ppl.c:937:29: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct md_rdev *parity_rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
>    drivers/md/raid5-ppl.c:937:29: sparse:     expected struct md_rdev *parity_rdev
>    drivers/md/raid5-ppl.c:937:29: sparse:     got struct md_rdev [noderef] __rcu *rdev
>    drivers/md/raid5-ppl.c:1407:54: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct md_rdev *rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
>    drivers/md/raid5-ppl.c:1407:54: sparse:     expected struct md_rdev *rdev
>    drivers/md/raid5-ppl.c:1407:54: sparse:     got struct md_rdev [noderef] __rcu *rdev
> 
> vim +632 drivers/md/raid5-ppl.c
> 
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  607  
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  608  static void ppl_do_flush(struct ppl_io_unit *io)
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  609  {
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  610  	struct ppl_log *log = io->log;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  611  	struct ppl_conf *ppl_conf = log->ppl_conf;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  612  	struct r5conf *conf = ppl_conf->mddev->private;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  613  	int raid_disks = conf->raid_disks;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  614  	int flushed_disks = 0;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  615  	int i;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  616  
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  617  	atomic_set(&io->pending_flushes, raid_disks);
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  618  
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  619  	for_each_set_bit(i, &log->disk_flush_bitmap, raid_disks) {
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  620  		struct md_rdev *rdev;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  621  		struct block_device *bdev = NULL;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  622  
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  623  		rcu_read_lock();
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  624  		rdev = rcu_dereference(conf->disks[i].rdev);
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  625  		if (rdev && !test_bit(Faulty, &rdev->flags))
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  626  			bdev = rdev->bdev;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  627  		rcu_read_unlock();
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  628  
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  629  		if (bdev) {
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  630  			struct bio *bio;
> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  631  
> 609be1066731fe Christoph Hellwig 2022-01-24 @632  			bio = bio_alloc_bioset(bdev, 0, GFP_NOIO,
> 609be1066731fe Christoph Hellwig 2022-01-24 @633  					       REQ_OP_WRITE | REQ_PREFLUSH,
> 609be1066731fe Christoph Hellwig 2022-01-24  634  					       &ppl_conf->flush_bs);

Something is odd about this report. Seems like the new sparse errors
were caused by this commit, not the one I sent that was noted at the top
of this email.

Looks like the arguments in bio_alloc_bioset are incorrectly reversed in
609be10667 and this hasn't been fixed yet, at least not in Linus's tree.

The patch I sent (b0920ede081b3f) may have introduced some of the rdev
sparse warnings in this report, but these were fixed up a couple commits
later (4f4ee2bf3).

Logan

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

* Re: [kbuild-all] Re: drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types)
  2022-05-27 21:18 ` Logan Gunthorpe
@ 2022-05-31  9:41   ` Chen, Rong A
  0 siblings, 0 replies; 3+ messages in thread
From: Chen, Rong A @ 2022-05-31  9:41 UTC (permalink / raw)
  To: Logan Gunthorpe, kernel test robot
  Cc: kbuild-all, linux-kernel, Song Liu, Christoph Hellwig



On 5/28/2022 5:18 AM, Logan Gunthorpe wrote:
> 
> 
> On 2022-05-27 14:46, kernel test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   7e284070abe53d448517b80493863595af4ab5f0
>> commit: b0920ede081b3f1659872f80ce552305610675a6 md/raid5: Add __rcu annotation to struct disk_info
>> date:   5 weeks ago
>> config: csky-randconfig-s032-20220524 (https://download.01.org/0day-ci/archive/20220528/202205280426.NVpnRyuP-lkp@intel.com/config)
>> compiler: csky-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-14-g5a0004b5-dirty
>>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0920ede081b3f1659872f80ce552305610675a6
>>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>          git fetch --no-tags linus master
>>          git checkout b0920ede081b3f1659872f80ce552305610675a6
>>          # 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=csky SHELL=/bin/bash drivers/md/
>>
>> If you fix the issue, kindly add following tag where applicable
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>>
>> sparse warnings: (new ones prefixed by >>)
>>     drivers/md/raid5-ppl.c: note: in included file:
>>     drivers/md/raid5.h:271:14: sparse: sparse: array of flexible structures
>>>> drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned int opf @@     got restricted gfp_t [usertype] @@
>>     drivers/md/raid5-ppl.c:632:57: sparse:     expected unsigned int opf
>>     drivers/md/raid5-ppl.c:632:57: sparse:     got restricted gfp_t [usertype]
>>>> drivers/md/raid5-ppl.c:633:61: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted gfp_t [usertype] gfp_mask @@     got unsigned long long @@
>>     drivers/md/raid5-ppl.c:633:61: sparse:     expected restricted gfp_t [usertype] gfp_mask
>>     drivers/md/raid5-ppl.c:633:61: sparse:     got unsigned long long
>>     drivers/md/raid5-ppl.c:886:30: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct md_rdev *rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
>>     drivers/md/raid5-ppl.c:886:30: sparse:     expected struct md_rdev *rdev
>>     drivers/md/raid5-ppl.c:886:30: sparse:     got struct md_rdev [noderef] __rcu *rdev
>>     drivers/md/raid5-ppl.c:937:29: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct md_rdev *parity_rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
>>     drivers/md/raid5-ppl.c:937:29: sparse:     expected struct md_rdev *parity_rdev
>>     drivers/md/raid5-ppl.c:937:29: sparse:     got struct md_rdev [noderef] __rcu *rdev
>>     drivers/md/raid5-ppl.c:1407:54: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct md_rdev *rdev @@     got struct md_rdev [noderef] __rcu *rdev @@
>>     drivers/md/raid5-ppl.c:1407:54: sparse:     expected struct md_rdev *rdev
>>     drivers/md/raid5-ppl.c:1407:54: sparse:     got struct md_rdev [noderef] __rcu *rdev
>>
>> vim +632 drivers/md/raid5-ppl.c
>>
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  607
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  608  static void ppl_do_flush(struct ppl_io_unit *io)
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  609  {
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  610  	struct ppl_log *log = io->log;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  611  	struct ppl_conf *ppl_conf = log->ppl_conf;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  612  	struct r5conf *conf = ppl_conf->mddev->private;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  613  	int raid_disks = conf->raid_disks;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  614  	int flushed_disks = 0;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  615  	int i;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  616
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  617  	atomic_set(&io->pending_flushes, raid_disks);
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  618
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  619  	for_each_set_bit(i, &log->disk_flush_bitmap, raid_disks) {
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  620  		struct md_rdev *rdev;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  621  		struct block_device *bdev = NULL;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  622
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  623  		rcu_read_lock();
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  624  		rdev = rcu_dereference(conf->disks[i].rdev);
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  625  		if (rdev && !test_bit(Faulty, &rdev->flags))
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  626  			bdev = rdev->bdev;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  627  		rcu_read_unlock();
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  628
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  629  		if (bdev) {
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  630  			struct bio *bio;
>> 1532d9e87e8b23 Tomasz Majchrzak  2017-12-27  631
>> 609be1066731fe Christoph Hellwig 2022-01-24 @632  			bio = bio_alloc_bioset(bdev, 0, GFP_NOIO,
>> 609be1066731fe Christoph Hellwig 2022-01-24 @633  					       REQ_OP_WRITE | REQ_PREFLUSH,
>> 609be1066731fe Christoph Hellwig 2022-01-24  634  					       &ppl_conf->flush_bs);
> 
> Something is odd about this report. Seems like the new sparse errors
> were caused by this commit, not the one I sent that was noted at the top
> of this email.

Hi Logan,

The bot only compares the errors with the parent commit, so the errors
may not first introduced by the reported commit, for this case:

errors on parent commit (b0920ede08):
../drivers/md/raid5-ppl.c: note: in included file:
../drivers/md/raid5-ppl.c:624:24: sparse: error: incompatible types in 
comparison expression (different address spaces):
../drivers/md/raid5-ppl.c:624:24: sparse:    struct md_rdev [noderef] 
__rcu *
../drivers/md/raid5-ppl.c:624:24: sparse:    struct md_rdev

errors on this commit (3d9a644cf4):

../drivers/md/raid5-ppl.c: note: in included file:
../drivers/md/raid5-ppl.c:632:57: sparse: warning: incorrect type in 
argument 3 (different base types)
../drivers/md/raid5-ppl.c:632:57: sparse:    expected unsigned int opf
../drivers/md/raid5-ppl.c:632:57: sparse:    got restricted gfp_t [usertype]
../drivers/md/raid5-ppl.c:633:61: sparse: warning: incorrect type in 
argument 4 (different base types)
../drivers/md/raid5-ppl.c:633:61: sparse:    expected restricted gfp_t 
[usertype] gfp_mask
../drivers/md/raid5-ppl.c:633:61: sparse:    got unsigned long long
../drivers/md/raid5-ppl.c:886:30: sparse: warning: incorrect type in 
assignment (different address spaces)
../drivers/md/raid5-ppl.c:886:30: sparse:    expected struct md_rdev *rdev
../drivers/md/raid5-ppl.c:886:30: sparse:    got struct md_rdev 
[noderef] __rcu *rdev
../drivers/md/raid5-ppl.c:937:29: sparse: warning: incorrect type in 
assignment (different address spaces)
../drivers/md/raid5-ppl.c:937:29: sparse:    expected struct md_rdev 
*parity_rdev
../drivers/md/raid5-ppl.c:937:29: sparse:    got struct md_rdev 
[noderef] __rcu *rdev
../drivers/md/raid5-ppl.c:1407:54: sparse: warning: incorrect type in 
initializer (different address spaces)
../drivers/md/raid5-ppl.c:1407:54: sparse:    expected struct md_rdev *rdev
../drivers/md/raid5-ppl.c:1407:54: sparse:    got struct md_rdev 
[noderef] __rcu *rdev

Best Regards,
Rong Chen

> 
> Looks like the arguments in bio_alloc_bioset are incorrectly reversed in
> 609be10667 and this hasn't been fixed yet, at least not in Linus's tree.
> 
> The patch I sent (b0920ede081b3f) may have introduced some of the rdev
> sparse warnings in this report, but these were fixed up a couple commits
> later (4f4ee2bf3).
> 
> Logan
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org
> 

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

end of thread, other threads:[~2022-05-31  9:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 20:46 drivers/md/raid5-ppl.c:632:57: sparse: sparse: incorrect type in argument 3 (different base types) kernel test robot
2022-05-27 21:18 ` Logan Gunthorpe
2022-05-31  9:41   ` [kbuild-all] " Chen, Rong A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).