[dm-devel] [dm:for-next 30/30] drivers/md/dm-clone-target.c:563:14: error: too few arguments to function 'kvmalloc'

kbuild test robot lkp at intel.com
Thu Sep 12 03:15:39 UTC 2019


tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head:   25e871a221e3e7bdf31745d7aaaeffb671edfeac
commit: 25e871a221e3e7bdf31745d7aaaeffb671edfeac [30/30] dm: add clone target
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 25e871a221e3e7bdf31745d7aaaeffb671edfeac
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/md/dm-clone-target.c: In function 'hash_table_init':
>> drivers/md/dm-clone-target.c:563:14: error: too few arguments to function 'kvmalloc'
     clone->ht = kvmalloc(sz * sizeof(struct hash_table_bucket));
                 ^~~~~~~~
   In file included from include/linux/highmem.h:8:0,
                    from include/linux/bio.h:8,
                    from drivers/md/dm-clone-target.c:6:
   include/linux/mm.h:668:21: note: declared here
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~

vim +/kvmalloc +563 drivers/md/dm-clone-target.c

   549	
   550	#define bucket_lock_irqsave(bucket, flags) \
   551		spin_lock_irqsave(&(bucket)->lock, flags)
   552	
   553	#define bucket_unlock_irqrestore(bucket, flags) \
   554		spin_unlock_irqrestore(&(bucket)->lock, flags)
   555	
   556	static int hash_table_init(struct clone *clone)
   557	{
   558		unsigned int i, sz;
   559		struct hash_table_bucket *bucket;
   560	
   561		sz = 1 << HASH_TABLE_BITS;
   562	
 > 563		clone->ht = kvmalloc(sz * sizeof(struct hash_table_bucket));
   564		if (!clone->ht)
   565			return -ENOMEM;
   566	
   567		for (i = 0; i < sz; i++) {
   568			bucket = clone->ht + i;
   569	
   570			INIT_HLIST_HEAD(&bucket->head);
   571			spin_lock_init(&bucket->lock);
   572		}
   573	
   574		return 0;
   575	}
   576	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 55847 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20190912/28e34731/attachment.gz>


More information about the dm-devel mailing list