Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for NUMA systems
From: Andrew Morton
Date: Mon May 22 2017 - 17:45:18 EST
On Mon, 22 May 2017 13:56:21 -0700 Matthias Kaehlcke <mka@xxxxxxxxxxxx> wrote:
> El Mon, May 22, 2017 at 01:39:26PM -0700 David Rientjes ha dit:
> > On Fri, 19 May 2017, Matthias Kaehlcke wrote:
> > > The function is only used when CONFIG_NUMA=y. Placing it in an #ifdef
> > > block fixes the following warning when building with clang:
> > >
> > > mm/slub.c:1246:20: error: unused function 'kmalloc_large_node_hook'
> > > [-Werror,-Wunused-function]
> > >
> > Is clang not inlining kmalloc_large_node_hook() for some reason? I don't
> > think this should ever warn on gcc.
> clang warns about unused static inline functions outside of header
> files, in difference to gcc.
I wish it wouldn't. These patches just add clutter.