linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jianqun Xu <jay.xu@rock-chips.com>,
	cl@linux.co, penberg@kernel.org, rientjes@google.com,
	iamjoonsoo.kim@lge.com, akpm@linux-foundation.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	Jianqun Xu <jay.xu@rock-chips.com>
Subject: Re: [PATCH] mm/slab: kmalloc with GFP_DMA32 allocate from SLAB_CACHE_DMA32
Date: Fri, 12 Mar 2021 21:20:57 +0800	[thread overview]
Message-ID: <202103122133.Xd1ulQFq-lkp@intel.com> (raw)
In-Reply-To: <20210312080320.1965201-1-jay.xu@rock-chips.com>

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

Hi Jianqun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-linux-mm/master]

url:    https://github.com/0day-ci/linux/commits/Jianqun-Xu/mm-slab-kmalloc-with-GFP_DMA32-allocate-from-SLAB_CACHE_DMA32/20210312-160426
base:   https://github.com/hnaz/linux-mm master
config: x86_64-randconfig-a006-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7b153b43d3a14d76975039408c4b922beb576735)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/93abfa9fa97332c9d5c1727fcf76b604b6da33de
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jianqun-Xu/mm-slab-kmalloc-with-GFP_DMA32-allocate-from-SLAB_CACHE_DMA32/20210312-160426
        git checkout 93abfa9fa97332c9d5c1727fcf76b604b6da33de
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

>> mm/slab_common.c:812:24: error: implicit declaration of function 'kmalloc_size' [-Werror,-Wimplicit-function-declaration]
                           unsigned int size = kmalloc_size(i);
                                               ^
>> mm/slab_common.c:813:20: error: implicit declaration of function 'kmalloc_cache_name' [-Werror,-Wimplicit-function-declaration]
                           const char *n = kmalloc_cache_name("dma32-kmalloc", size);
                                           ^
>> mm/slab_common.c:813:16: warning: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
                           const char *n = kmalloc_cache_name("dma32-kmalloc", size);
                                       ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 2 errors generated.


vim +/kmalloc_size +812 mm/slab_common.c

   761	
   762	/*
   763	 * Create the kmalloc array. Some of the regular kmalloc arrays
   764	 * may already have been created because they were needed to
   765	 * enable allocations for slab creation.
   766	 */
   767	void __init create_kmalloc_caches(slab_flags_t flags)
   768	{
   769		int i;
   770		enum kmalloc_cache_type type;
   771	
   772		for (type = KMALLOC_NORMAL; type <= KMALLOC_RECLAIM; type++) {
   773			for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
   774				if (!kmalloc_caches[type][i])
   775					new_kmalloc_cache(i, type, flags);
   776	
   777				/*
   778				 * Caches that are not of the two-to-the-power-of size.
   779				 * These have to be created immediately after the
   780				 * earlier power of two caches
   781				 */
   782				if (KMALLOC_MIN_SIZE <= 32 && i == 6 &&
   783						!kmalloc_caches[type][1])
   784					new_kmalloc_cache(1, type, flags);
   785				if (KMALLOC_MIN_SIZE <= 64 && i == 7 &&
   786						!kmalloc_caches[type][2])
   787					new_kmalloc_cache(2, type, flags);
   788			}
   789		}
   790	
   791		/* Kmalloc array is now usable */
   792		slab_state = UP;
   793	
   794	#ifdef CONFIG_ZONE_DMA
   795		for (i = 0; i <= KMALLOC_SHIFT_HIGH; i++) {
   796			struct kmem_cache *s = kmalloc_caches[KMALLOC_NORMAL][i];
   797	
   798			if (s) {
   799				kmalloc_caches[KMALLOC_DMA][i] = create_kmalloc_cache(
   800					kmalloc_info[i].name[KMALLOC_DMA],
   801					kmalloc_info[i].size,
   802					SLAB_CACHE_DMA | flags, 0,
   803					kmalloc_info[i].size);
   804			}
   805		}
   806	#endif
   807	#ifdef CONFIG_ZONE_DMA32
   808		for (i = 0; i <= KMALLOC_SHIFT_HIGH; i++) {
   809			struct kmem_cache *s = kmalloc_caches[KMALLOC_NORMAL][i];
   810	
   811			if (s) {
 > 812				unsigned int size = kmalloc_size(i);
 > 813				const char *n = kmalloc_cache_name("dma32-kmalloc", size);
   814	
   815				BUG_ON(!n);
   816				kmalloc_caches[KMALLOC_DMA32][i] = create_kmalloc_cache(
   817					n, size, SLAB_CACHE_DMA32 | flags, 0, 0);
   818			}
   819		}
   820	#endif
   821	}
   822	#endif /* !CONFIG_SLOB */
   823	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

      parent reply	other threads:[~2021-03-12 13:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  8:03 Jianqun Xu
2021-03-12  9:29 ` Christoph Hellwig
2021-03-12 13:20 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202103122133.Xd1ulQFq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.co \
    --cc=clang-built-linux@googlegroups.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jay.xu@rock-chips.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox