From: Nathan Chancellor <nathan@kernel.org>
To: Nicolas Schier <n.schier@fritz.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
llvm@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] scripts/sorttable: Mark long_size as __maybe_unused
Date: Tue, 8 Sep 2026 16:37:01 -0700 [thread overview]
Message-ID: <20260908233701.GA2981326@ax162> (raw)
In-Reply-To: <20260904-dancing-cobalt-ibex-8a039c@l-nschier-aarch64>
On Fri, Sep 04, 2026 at 09:34:10PM +0200, Nicolas Schier wrote:
> On Mon, Aug 31, 2026 at 06:46:31PM -0700, Nathan Chancellor wrote:
> > When building in a kernel tree prior to commit b055f4c431e3 ("sorttable:
> > Move ELF parsing into scripts/elf-parse.[ch]") with clang-23 or newer,
> > which implements a new warning under -Wunused-but-set-variable for
> > static global variable, there is a warning from sorttable because
> > long_size is unused when MCOUNT_SORT_ENABLED is not set:
> >
> > scripts/sorttable.c:452:12: error: variable 'long_size' set but not used [-Werror,-Wunused-but-set-global]
> > 452 | static int long_size;
> > | ^
> >
> > Mark long_size as __maybe_unused to avoid inserting more ugly #ifdef
> > directives while insuring the warning does not reappear, as the
> > aforementioned change does not alter the uses of long_size, so it
> > appears to be coincidence that the warning disappears after this
> > refactoring.
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
> > This is breaking our builds on stable:
> >
> > https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/33143924291
> >
> > There was a previous patch sent for this issue
> >
> > https://lore.kernel.org/20260603191708.27241-1-beakthoven@gmail.com/
> >
> > but it was marked as stable only. I think this should be taken via
> > mainline and backported the normal way, as it appears to be coincidence
> > that the warning is not present in mainline. It does not look like
> > scripts/sorttable.c has a formal owner according to MAINTAINERS so this
> > could either go through one of Steve's trees or the kbuild tree.
> > ---
> > scripts/sorttable.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> Thanks!
>
> Tested-by: Nicolas Schier <n.schier@fritz.com>
Thanks. Given how trivial this is and since it needs to go to stable,
could you take this via kbuild-fixes?
--
Cheers,
Nathan
next prev parent reply other threads:[~2026-09-08 23:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 1:46 Nathan Chancellor
2026-09-04 19:34 ` Nicolas Schier
2026-09-08 23:37 ` Nathan Chancellor [this message]
2026-09-09 6:11 ` Nicolas Schier
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=20260908233701.GA2981326@ax162 \
--to=nathan@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=n.schier@fritz.com \
--cc=ndesaulniers@google.com \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®