Re: [PATCH v1 1/1] lockdep: Mark chain_hlock_class_idx() with __maybe_unused

From: Andy Shevchenko
Date: Sun Dec 15 2024 - 16:21:57 EST


On Sun, Dec 15, 2024 at 11:55:08AM -0800, Boqun Feng wrote:
> On Mon, Dec 09, 2024 at 07:08:10PM +0200, Andy Shevchenko wrote:
> > When chain_hlock_class_idx() is unused, it prevents kernel builds with clang,
> > `make W=1` and CONFIG_WERROR=y:
> >
> > kernel/locking/lockdep.c:435:28: error: unused function 'chain_hlock_class_idx' [-Werror,-Wunused-function]
> >
> > Fix this by marking it with __maybe_unused.
> >
> > See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
> > inline functions for W=1 build").
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> This looks fine to me, so I'm going to queue it, but could you do me
> favor if you could share the exact configs that would make
> chain_hlock_class_idx() an unused fuction in kernel/locking/lockdep.c ?

I might harvest this when I come from vacations (some around mid-January).

> I might add these information in commit log.


--
With Best Regards,
Andy Shevchenko