All of lore.kernel.org
 help / color / mirror / Atom feed
* [fscrypt:fscrypt-dio-support 4/15] block/blk-crypto-fallback.c:225:28: error: 'len' undeclared
@ 2021-02-12 17:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-12 17:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3338 bytes --]

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=3ec1c215d23bd5c4381368a60deb057164a84230
        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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38071 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-12 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 17:27 [fscrypt:fscrypt-dio-support 4/15] block/blk-crypto-fallback.c:225:28: error: 'len' undeclared kernel test robot

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.