Re: [PATCH v1 1/1] mm/page_alloc: Mark has_unaccepted_memory() with __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thu, Sep 05, 2024 at 02:22:20PM -0700, Andrew Morton kirjoitti:
> On Thu,  5 Sep 2024 20:15:53 +0300 Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> 
> > When has_unaccepted_memory() is unused, it prevents kernel builds
> > with clang, `make W=1` and CONFIG_WERROR=y:
> > 
> > mm/page_alloc.c:7036:20: error: unused function 'has_unaccepted_memory' [-Werror,-Wunused-function]
> >  7036 | static inline bool has_unaccepted_memory(void)
> >       |                    ^~~~~~~~~~~~~~~~~~~~~
> > 
> > Fix this by marking it with __maybe_unused (all cases for the sake of
> > symmetry).
> > 
> > See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
> > inline functions for W=1 build").
> 
> has_unaccepted_memory() has no callers if CONFIG_UNACCEPTED_MEMORY=n. 
> Can't we do this better thing?

Sure! Please, use your patch, I'm fine with that
Reported-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux