linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [vbabka-slab:for-6.1/common_kmalloc 12/17] mm/slab_common.c:1023:7: warning: no previous prototype for '__kmalloc_large_node'
@ 2022-08-24  2:46 kernel test robot
  2022-08-24  3:49 ` Hyeonggon Yoo
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2022-08-24  2:46 UTC (permalink / raw)
  To: Hyeonggon Yoo; +Cc: kbuild-all, linux-mm, Vlastimil Babka

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git for-6.1/common_kmalloc
head:   b261334803b44092acd06be3c9f32c46af818359
commit: 79c7527b9805edf14c952deca45de60a8a06a414 [12/17] mm/sl[au]b: generalize kmalloc subsystem
config: x86_64-randconfig-a015 (https://download.01.org/0day-ci/archive/20220824/202208241004.jZykmQOH-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git/commit/?id=79c7527b9805edf14c952deca45de60a8a06a414
        git remote add vbabka-slab git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git
        git fetch --no-tags vbabka-slab for-6.1/common_kmalloc
        git checkout 79c7527b9805edf14c952deca45de60a8a06a414
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> mm/slab_common.c:1023:7: warning: no previous prototype for '__kmalloc_large_node' [-Wmissing-prototypes]
    1023 | void *__kmalloc_large_node(size_t size, gfp_t flags, int node)
         |       ^~~~~~~~~~~~~~~~~~~~


vim +/__kmalloc_large_node +1023 mm/slab_common.c

  1016	
  1017	/*
  1018	 * To avoid unnecessary overhead, we pass through large allocation requests
  1019	 * directly to the page allocator. We use __GFP_COMP, because we will need to
  1020	 * know the allocation order to free the pages properly in kfree.
  1021	 */
  1022	
> 1023	void *__kmalloc_large_node(size_t size, gfp_t flags, int node)
  1024	{
  1025		struct page *page;
  1026		void *ptr = NULL;
  1027		unsigned int order = get_order(size);
  1028	
  1029		if (unlikely(flags & GFP_SLAB_BUG_MASK))
  1030			flags = kmalloc_fix_flags(flags);
  1031	
  1032		flags |= __GFP_COMP;
  1033		page = alloc_pages_node(node, flags, order);
  1034		if (page) {
  1035			ptr = page_address(page);
  1036			mod_lruvec_page_state(page, NR_SLAB_UNRECLAIMABLE_B,
  1037					      PAGE_SIZE << order);
  1038		}
  1039	
  1040		ptr = kasan_kmalloc_large(ptr, size, flags);
  1041		/* As ptr might get tagged, call kmemleak hook after KASAN. */
  1042		kmemleak_alloc(ptr, size, 1, flags);
  1043	
  1044		return ptr;
  1045	}
  1046	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-25  5:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  2:46 [vbabka-slab:for-6.1/common_kmalloc 12/17] mm/slab_common.c:1023:7: warning: no previous prototype for '__kmalloc_large_node' kernel test robot
2022-08-24  3:49 ` Hyeonggon Yoo
2022-08-24 12:57   ` Vlastimil Babka
2022-08-24 13:35     ` Hyeonggon Yoo
2022-08-24 14:27       ` Vlastimil Babka
2022-08-25  5:06         ` Hyeonggon Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox