tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6614a3c3164a5df2b54abb0b3559f51041cf705b
commit: 4ce4c73f662bdb0ae5bfb058bc7ec6f6829ca078 md/core: Combine two sync_page_io() arguments
date: 3 weeks ago
config: alpha-randconfig-s042-20220804 (https://download.01.org/0day-ci/archive/20220806/[email protected]/config)
compiler: alpha-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4ce4c73f662bdb0ae5bfb058bc7ec6f6829ca078
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4ce4c73f662bdb0ae5bfb058bc7ec6f6829ca078
# 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=alpha SHELL=/bin/bash .// drivers/ kernel/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
drivers/md/raid10.c:1946:37: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1946:37: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1946:37: sparse: struct md_rdev *
drivers/md/raid10.c:4919:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:4919:33: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:4919:33: sparse: struct md_rdev *
drivers/md/raid10.c:4922:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:4922:33: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:4922:33: sparse: struct md_rdev *
drivers/md/raid10.c:5011:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:5011:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:5011:32: sparse: struct md_rdev *
drivers/md/raid10.c:5014:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:5014:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:5014:32: sparse: struct md_rdev *
drivers/md/raid10.c:759:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:759:24: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:759:24: sparse: struct md_rdev *
drivers/md/raid10.c:762:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:762:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:762:32: sparse: struct md_rdev *
drivers/md/raid10.c:1139:30: sparse: sparse: incorrect type in initializer (different base types) @@ expected int const op @@ got restricted blk_opf_t enum req_op @@
drivers/md/raid10.c:1139:30: sparse: expected int const op
drivers/md/raid10.c:1139:30: sparse: got restricted blk_opf_t enum req_op
drivers/md/raid10.c:1140:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned long const do_sync @@ got restricted blk_opf_t @@
drivers/md/raid10.c:1140:52: sparse: expected unsigned long const do_sync
drivers/md/raid10.c:1140:52: sparse: got restricted blk_opf_t
drivers/md/raid10.c:1165:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1165:28: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1165:28: sparse: struct md_rdev *
drivers/md/raid10.c:1233:30: sparse: sparse: incorrect type in initializer (different base types) @@ expected int const op @@ got restricted blk_opf_t enum req_op @@
drivers/md/raid10.c:1234:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned long const do_sync @@ got restricted blk_opf_t @@
drivers/md/raid10.c:1235:51: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned long const do_fua @@ got restricted blk_opf_t @@
drivers/md/raid10.c:1263:32: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted blk_opf_t enum req_op op @@ got int const op @@
drivers/md/raid10.c:1263:44: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted blk_opf_t [usertype] op_flags @@ got unsigned long @@
drivers/md/raid10.c:1303:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1303:40: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1303:40: sparse: struct md_rdev *
drivers/md/raid10.c:1304:41: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1304:41: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1304:41: sparse: struct md_rdev *
drivers/md/raid10.c:1434:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1434:40: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1434:40: sparse: struct md_rdev *
drivers/md/raid10.c:1435:41: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1435:41: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1435:41: sparse: struct md_rdev *
drivers/md/raid10.c:1744:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1744:40: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1744:40: sparse: struct md_rdev *
drivers/md/raid10.c:1745:41: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1745:41: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1745:41: sparse: struct md_rdev *
drivers/md/raid10.c:1913:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:1913:40: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:1913:40: sparse: struct md_rdev *
drivers/md/raid10.c:2142:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:2142:25: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:2142:25: sparse: struct md_rdev *
drivers/md/raid10.c:2156:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:2156:17: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:2156:17: sparse: struct md_rdev *
>> drivers/md/raid10.c:2647:60: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted blk_opf_t [usertype] opf @@ got int rw @@
drivers/md/raid10.c:2716:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:2716:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:2716:32: sparse: struct md_rdev *
drivers/md/raid10.c:2769:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:2769:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:2769:32: sparse: struct md_rdev *
drivers/md/raid10.c:2803:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:2803:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:2803:32: sparse: struct md_rdev *
drivers/md/raid10.c:3313:49: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3313:49: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3313:49: sparse: struct md_rdev *
drivers/md/raid10.c:3388:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3388:33: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3388:33: sparse: struct md_rdev *
drivers/md/raid10.c:3389:36: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3389:36: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3389:36: sparse: struct md_rdev *
drivers/md/raid10.c:3459:56: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3459:56: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3459:56: sparse: struct md_rdev *
drivers/md/raid10.c:3476:41: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3476:41: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3476:41: sparse: struct md_rdev *
drivers/md/raid10.c:3679:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3679:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3679:32: sparse: struct md_rdev *
drivers/md/raid10.c:3709:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:3709:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:3709:32: sparse: struct md_rdev *
drivers/md/raid10.c:4452:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:4452:40: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:4452:40: sparse: struct md_rdev *
drivers/md/raid10.c:4468:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:4468:40: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:4468:40: sparse: struct md_rdev *
drivers/md/raid10.c:5096:48: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:5096:48: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:5096:48: sparse: struct md_rdev *
drivers/md/raid10.c:5192:48: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:5192:48: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:5192:48: sparse: struct md_rdev *
drivers/md/raid10.c:5195:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/md/raid10.c:5195:32: sparse: struct md_rdev [noderef] __rcu *
drivers/md/raid10.c:5195:32: sparse: struct md_rdev *
vim +2647 drivers/md/raid10.c
2637
2638 static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector,
2639 int sectors, struct page *page, int rw)
2640 {
2641 sector_t first_bad;
2642 int bad_sectors;
2643
2644 if (is_badblock(rdev, sector, sectors, &first_bad, &bad_sectors)
2645 && (rw == READ || test_bit(WriteErrorSeen, &rdev->flags)))
2646 return -1;
> 2647 if (sync_page_io(rdev, sector, sectors << 9, page, rw, false))
2648 /* success */
2649 return 1;
2650 if (rw == WRITE) {
2651 set_bit(WriteErrorSeen, &rdev->flags);
2652 if (!test_and_set_bit(WantReplacement, &rdev->flags))
2653 set_bit(MD_RECOVERY_NEEDED,
2654 &rdev->mddev->recovery);
2655 }
2656 /* need to record an error - either for the block or the device */
2657 if (!rdev_set_badblocks(rdev, sector, sectors, 0))
2658 md_error(rdev->mddev, rdev);
2659 return 0;
2660 }
2661
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On 8/5/22 21:44, kernel test robot wrote:
> drivers/md/raid10.c:1139:30: sparse: sparse: incorrect type in initializer (different base types) @@ expected int const op @@ got restricted blk_opf_t enum req_op @@
> drivers/md/raid10.c:1139:30: sparse: expected int const op
> drivers/md/raid10.c:1139:30: sparse: got restricted blk_opf_t enum req_op
> drivers/md/raid10.c:1140:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned long const do_sync @@ got restricted blk_opf_t @@
> drivers/md/raid10.c:1140:52: sparse: expected unsigned long const do_sync
> drivers/md/raid10.c:1140:52: sparse: got restricted blk_opf_t
I can't reproduce this with Linus' master branch. It seems like the
kernel test robot picked a commit somewhere halfway my patch series?
Bart.
On 8/6/2022 11:21 PM, Bart Van Assche wrote:
> On 8/5/22 21:44, kernel test robot wrote:
>> drivers/md/raid10.c:1139:30: sparse: sparse: incorrect type in
>> initializer (different base types) @@ expected int const op @@
>> got restricted blk_opf_t enum req_op @@
>> drivers/md/raid10.c:1139:30: sparse: expected int const op
>> drivers/md/raid10.c:1139:30: sparse: got restricted blk_opf_t
>> enum req_op
>> drivers/md/raid10.c:1140:52: sparse: sparse: incorrect type in
>> initializer (different base types) @@ expected unsigned long const
>> do_sync @@ got restricted blk_opf_t @@
>> drivers/md/raid10.c:1140:52: sparse: expected unsigned long
>> const do_sync
>> drivers/md/raid10.c:1140:52: sparse: got restricted blk_opf_t
>
> I can't reproduce this with Linus' master branch. It seems like the
> kernel test robot picked a commit somewhere halfway my patch series?
>
> Bart.
Hi Bart,
Only the warning prefixed by '>>' is related to this commit 4ce4c73f662b:
>> drivers/md/raid10.c:2647:60: sparse: sparse: incorrect type in
argument 5 (different base types) @@ expected restricted blk_opf_t
[usertype] opf @@ got int rw @@
and I can reproduce it in my system.
Best Regards,
Rong Chen
On 8/9/22 03:23, Chen, Rong A wrote:
> Only the warning prefixed by '>>' is related to this commit 4ce4c73f662b:
>
> >> drivers/md/raid10.c:2647:60: sparse: sparse: incorrect type in
> argument 5 (different base types) @@ expected restricted blk_opf_t
> [usertype] opf @@ got int rw @@
Thanks, I can reproduce this warning. I will send a fix.
Best regards,
Bart.