tree:
https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git fscrypt-dio-support
head: 7bf5b39672a543edac8dcce75e57758563a7ca6b
commit: 3ec1c215d23bd5c4381368a60deb057164a84230 [4/15] block: respect
blk_crypto_bio_sectors_alignment() in blk-crypto-fallback
config: h8300-randconfig-r003-20210211 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git/commit/?id=3ec1c215...
git remote add fscrypt
https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git
git fetch --no-tags fscrypt fscrypt-dio-support
git checkout 3ec1c215d23bd5c4381368a60deb057164a84230
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:13,
from include/linux/crypto.h:16,
from include/crypto/skcipher.h:11,
from block/blk-crypto-fallback.c:12:
block/blk-crypto-fallback.c: In function 'blk_crypto_split_bio_if_needed':
> block/blk-crypto-fallback.c:225:28: error: 'len'
undeclared (first use in this function)
225 | num_sectors = round_down(len,
| ^~~
include/linux/math.h:34:28: note: in definition of macro 'round_down'
34 | #define round_down(x, y) ((x) & ~__round_mask(x, y))
| ^
block/blk-crypto-fallback.c:225:28: note: each undeclared identifier is reported only
once for each function it appears in
225 | num_sectors = round_down(len,
| ^~~
include/linux/math.h:34:28: note: in definition of macro 'round_down'
34 | #define round_down(x, y) ((x) & ~__round_mask(x, y))
| ^
vim +/len +225 block/blk-crypto-fallback.c
208
209 static bool blk_crypto_split_bio_if_needed(struct bio **bio_ptr)
210 {
211 struct bio *bio = *bio_ptr;
212 unsigned int i = 0;
213 unsigned int num_sectors = 0;
214 struct bio_vec bv;
215 struct bvec_iter iter;
216
217 bio_for_each_segment(bv, bio, iter) {
218 num_sectors += bv.bv_len >> SECTOR_SHIFT;
219 if (++i == BIO_MAX_PAGES)
220 break;
221 }
222 if (num_sectors < bio_sectors(bio)) {
223 struct bio *split_bio;
224
225 num_sectors = round_down(len,
226
blk_crypto_bio_sectors_alignment(bio));
227 split_bio = bio_split(bio, num_sectors, GFP_NOIO, NULL);
228 if (!split_bio) {
229 bio->bi_status = BLK_STS_RESOURCE;
230 return false;
231 }
232 bio_chain(split_bio, bio);
233 submit_bio_noacct(bio);
234 *bio_ptr = split_bio;
235 }
236
237 return true;
238 }
239
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org