block/blk-crypto-fallback.c:154:17: sparse: sparse: cast to restricted blk_status_t
From: kernel test robot
Date: Mon Jun 22 2026 - 11:04:52 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ef0c9f75a19532d7675384708fc8621e10850104
commit: b37fbce460ad60b0c4449c1c7566cf24f3016713 blk-crypto: optimize bio splitting in blk_crypto_fallback_encrypt_bio
date: 5 months ago
config: powerpc-randconfig-r131-20260622 (https://download.01.org/0day-ci/archive/20260622/202606222211.Xt0AGJNd-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 16.1.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260622/202606222211.Xt0AGJNd-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: b37fbce460ad ("blk-crypto: optimize bio splitting in blk_crypto_fallback_encrypt_bio")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606222211.Xt0AGJNd-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
>> block/blk-crypto-fallback.c:154:17: sparse: sparse: cast to restricted blk_status_t
vim +154 block/blk-crypto-fallback.c
143
144 static void blk_crypto_fallback_encrypt_endio(struct bio *enc_bio)
145 {
146 struct bio *src_bio = enc_bio->bi_private;
147 int i;
148
149 for (i = 0; i < enc_bio->bi_vcnt; i++)
150 mempool_free(enc_bio->bi_io_vec[i].bv_page,
151 blk_crypto_bounce_page_pool);
152
153 if (enc_bio->bi_status)
> 154 cmpxchg(&src_bio->bi_status, 0, enc_bio->bi_status);
155
156 bio_put(enc_bio);
157 bio_endio(src_bio);
158 }
159
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki