From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Jens Axboe <axboe@kernel.dk>
Subject: drivers/md/raid10.c:2647:60: sparse: sparse: incorrect type in argument 5 (different base types)
Date: Sat, 6 Aug 2022 12:44:11 +0800 [thread overview]
Message-ID: <202208061258.jAwlaAXe-lkp@intel.com> (raw)
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/202208061258.jAwlaAXe-lkp@intel.com/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 <lkp@intel.com>
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
next reply other threads:[~2022-08-06 4:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-06 4:44 kernel test robot [this message]
2022-08-06 15:21 ` drivers/md/raid10.c:2647:60: sparse: sparse: incorrect type in argument 5 (different base types) Bart Van Assche
2022-08-06 15:21 ` Bart Van Assche
2022-08-09 10:23 ` [kbuild-all] " Chen, Rong A
2022-08-09 13:22 ` Bart Van Assche
2022-08-09 13:22 ` [kbuild-all] " Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208061258.jAwlaAXe-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.