linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, linux-mm@kvack.org
Subject: Re: [vbabka-slab:for-6.1/common_kmalloc 12/17] mm/slab_common.c:1023:7: warning: no previous prototype for '__kmalloc_large_node'
Date: Wed, 24 Aug 2022 22:35:03 +0900	[thread overview]
Message-ID: <YwYpB1891I8q3Ehv@hyeyoo> (raw)
In-Reply-To: <4eb30402-395c-6cb4-ab1e-a008c4bf32f8@suse.cz>

On Wed, Aug 24, 2022 at 02:57:40PM +0200, Vlastimil Babka wrote:
> On 8/24/22 05:49, Hyeonggon Yoo wrote:
> > On Wed, Aug 24, 2022 at 10:46:55AM +0800, kernel test robot wrote:
> > > 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)
> > >           |       ^~~~~~~~~~~~~~~~~~~~
> > 
> > Oh, I did not add static here.
> 
> Weird, I didn't get this warning even with W=1. Only the kerneldoc issues.

You can get with CONFIG_SLOB.

> > Please pull:
> > 	https://github.com/hygoni/linux.git slab-common-v4r1
> > 
> > Fixed warning above and also fixed wrong comment (@objp in comment but
> > its name is actually 'object')
> > 
> > git range-diff	for-6.1/common_kmalloc~17...for-6.1/common_kmalloc \
> > 		slab-common-v4r1~17...slab-common-v4r1:
> > 
> > 		 1:  0276f0da97e3 =  1:  0276f0da97e3 mm/slab: move NUMA-related code to __do_cache_alloc()
> >   2:  d5ea00e8d8c9 =  2:  d5ea00e8d8c9 mm/slab: cleanup slab_alloc() and slab_alloc_node()
> >   3:  48c55c42e6b8 =  3:  48c55c42e6b8 mm/slab_common: remove CONFIG_NUMA ifdefs for common kmalloc functions
> >   4:  cd8523b488ec =  4:  cd8523b488ec mm/slab_common: cleanup kmalloc_track_caller()
> >   5:  0b92d497e03a =  5:  0b92d497e03a mm/sl[au]b: factor out __do_kmalloc_node()
> >   6:  d43649c0f472 =  6:  d43649c0f472 mm/slab_common: fold kmalloc_order_trace() into kmalloc_large()
> >   7:  cd6d756d6118 =  7:  cd6d756d6118 mm/slub: move kmalloc_large_node() to slab_common.c
> >   8:  fe8f3819416e !  8:  ec277200c5dd mm/slab_common: kmalloc_node: pass large requests to page allocator
> >      @@ mm/slab_common.c: void *kmalloc_large(size_t size, gfp_t flags)
> >        EXPORT_SYMBOL(kmalloc_large);
> > 
> >       -void *kmalloc_large_node(size_t size, gfp_t flags, int node)
> >      -+void *kmalloc_large_node_notrace(size_t size, gfp_t flags, int node)
> >      ++static void *kmalloc_large_node_notrace(size_t size, gfp_t flags, int node)
> 
> Hmm this (and following changes to kmalloc_large_node_notrace) seems to be
> wrong, it's still called from slub.c and declared in slab.h at this point.

Ah, I'm very sorry for wrong fix.

> So I've fixed the warnings up locally and force-pushed updated
> for-6.1/common_kmalloc (head is now ba5801e322), please double-check.

kmalloc_large_node_notrace() need to be moved outside #ifdef CONFIG_SLOB
when the declaration is in slab.h as it's used for SLOB too.
(in patch 8)

-- 
Thanks,
Hyeonggon


  reply	other threads:[~2022-08-24 13:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  2:46 kernel test robot
2022-08-24  3:49 ` Hyeonggon Yoo
2022-08-24 12:57   ` Vlastimil Babka
2022-08-24 13:35     ` Hyeonggon Yoo [this message]
2022-08-24 14:27       ` Vlastimil Babka
2022-08-25  5:06         ` Hyeonggon Yoo

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=YwYpB1891I8q3Ehv@hyeyoo \
    --to=42.hyeyoo@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=vbabka@suse.cz \
    /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