[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205262005.fOq3Ctsn-lkp@intel.com>
Date: Thu, 26 May 2022 20:49:26 +0800
From: kernel test robot <lkp@...el.com>
To: Logan Gunthorpe <logang@...tatee.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [sbates130272-p2pmem:md-bug-v2 13/17]
drivers/md/raid5-cache.c:409:35: sparse: sparse: incorrect type in
initializer (different address spaces)
tree: https://github.com/sbates130272/linux-p2pmem.git md-bug-v2
head: 1816687fa5c6ba0cecc43d38a583d2ff56da9597
commit: c6c798f230d28e6ac1e28faa7d255ed7cf5ba3ff [13/17] md/raid5-cache: Add RCU protection to conf->log accesses
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220526/202205262005.fOq3Ctsn-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-14-g5a0004b5-dirty
# https://github.com/sbates130272/linux-p2pmem/commit/c6c798f230d28e6ac1e28faa7d255ed7cf5ba3ff
git remote add sbates130272-p2pmem https://github.com/sbates130272/linux-p2pmem.git
git fetch --no-tags sbates130272-p2pmem md-bug-v2
git checkout c6c798f230d28e6ac1e28faa7d255ed7cf5ba3ff
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/md/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/md/raid5-cache.c: note: in included file:
drivers/md/raid5.h:271:14: sparse: sparse: array of flexible structures
>> drivers/md/raid5-cache.c:409:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct r5l_log *log @@ got struct r5l_log [noderef] __rcu *log @@
drivers/md/raid5-cache.c:409:35: sparse: expected struct r5l_log *log
drivers/md/raid5-cache.c:409:35: sparse: got struct r5l_log [noderef] __rcu *log
drivers/md/raid5-cache.c:2668:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void **pslot @@ got void [noderef] __rcu ** @@
drivers/md/raid5-cache.c:2668:23: sparse: expected void **pslot
drivers/md/raid5-cache.c:2668:23: sparse: got void [noderef] __rcu **
drivers/md/raid5-cache.c:2672:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **pslot @@
drivers/md/raid5-cache.c:2672:33: sparse: expected void [noderef] __rcu **slot
drivers/md/raid5-cache.c:2672:33: sparse: got void **pslot
drivers/md/raid5-cache.c:2675:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **pslot @@
drivers/md/raid5-cache.c:2675:56: sparse: expected void [noderef] __rcu **slot
drivers/md/raid5-cache.c:2675:56: sparse: got void **pslot
drivers/md/raid5-cache.c:2823:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void **pslot @@ got void [noderef] __rcu ** @@
drivers/md/raid5-cache.c:2823:23: sparse: expected void **pslot
drivers/md/raid5-cache.c:2823:23: sparse: got void [noderef] __rcu **
drivers/md/raid5-cache.c:2827:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **pslot @@
drivers/md/raid5-cache.c:2827:25: sparse: expected void [noderef] __rcu **slot
drivers/md/raid5-cache.c:2827:25: sparse: got void **pslot
drivers/md/raid5-cache.c:2833:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **pslot @@
drivers/md/raid5-cache.c:2833:56: sparse: expected void [noderef] __rcu **slot
drivers/md/raid5-cache.c:2833:56: sparse: got void **pslot
vim +409 drivers/md/raid5-cache.c
a39f7afde358ca Song Liu 2016-11-17 401
2ded370373a400 Song Liu 2016-11-17 402 /*
2ded370373a400 Song Liu 2016-11-17 403 * Put the stripe into writing-out phase by clearing STRIPE_R5C_CACHING.
2ded370373a400 Song Liu 2016-11-17 404 * This function should only be called in write-back mode.
2ded370373a400 Song Liu 2016-11-17 405 */
a39f7afde358ca Song Liu 2016-11-17 406 void r5c_make_stripe_write_out(struct stripe_head *sh)
2ded370373a400 Song Liu 2016-11-17 407 {
2ded370373a400 Song Liu 2016-11-17 408 struct r5conf *conf = sh->raid_conf;
2ded370373a400 Song Liu 2016-11-17 @409 struct r5l_log *log = conf->log;
2ded370373a400 Song Liu 2016-11-17 410
2ded370373a400 Song Liu 2016-11-17 411 BUG_ON(!r5c_is_writeback(log));
2ded370373a400 Song Liu 2016-11-17 412
2ded370373a400 Song Liu 2016-11-17 413 WARN_ON(!test_bit(STRIPE_R5C_CACHING, &sh->state));
2ded370373a400 Song Liu 2016-11-17 414 clear_bit(STRIPE_R5C_CACHING, &sh->state);
1e6d690b9334b7 Song Liu 2016-11-17 415
1e6d690b9334b7 Song Liu 2016-11-17 416 if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
1e6d690b9334b7 Song Liu 2016-11-17 417 atomic_inc(&conf->preread_active_stripes);
1e6d690b9334b7 Song Liu 2016-11-17 418 }
1e6d690b9334b7 Song Liu 2016-11-17 419
:::::: The code at line 409 was first introduced by commit
:::::: 2ded370373a400c20cf0c6e941e724e61582a867 md/r5cache: State machine for raid5-cache write back mode
:::::: TO: Song Liu <songliubraving@...com>
:::::: CC: Shaohua Li <shli@...com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists