Re: [PATCH] maple_tree: Fix build failure with W=1 and LLVM=1

From: Andrew Morton
Date: Sat May 04 2024 - 19:03:31 EST


On Fri, 3 May 2024 09:08:21 -0700 Nathan Chancellor <nathan@xxxxxxxxxx> wrote:

> This patch has effectively been sent four times now:
>
> https://lore.kernel.org/all/20220914101829.82000-1-jiapeng.chong@xxxxxxxxxxxxxxxxx/
> https://lore.kernel.org/all/20230217084647.50471-1-jiapeng.chong@xxxxxxxxxxxxxxxxx/
> https://lore.kernel.org/all/20230319132903.1702426-1-trix@xxxxxxxxxx/
> https://lore.kernel.org/all/20240503095027.747838-1-visitorckw@xxxxxxxxx/ (this change obviously)
>
> Your first comment from the 2022 patch:
>
> They're not used now, but they will be in a release or two.
>
> I think a few releases have passed since then :) I don't personally care
> if there is a solution here or not, as I don't test with W=1 (there's
> enough to do at W=0 :P), but maybe it is time for either __maybe_unused
> (as that strikes at the heart of the issue) or at the very least a
> comment saying "hey, these functions are currently unused but there are
> plans for them to be used, so don't remove them", rather than just
> saying the status quo?

We could just slap a #if 0 around them. But I don't think it'll kill us to
have to type them in again one day ;)