From: Nicolas Schier <n.schier@fritz.com>
To: Nathan Chancellor <nathan@kernel.org>
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: Fri, 4 Sep 2026 21:34:10 +0200 [thread overview]
Message-ID: <20260904-dancing-cobalt-ibex-8a039c@l-nschier-aarch64> (raw)
In-Reply-To: <20260831-sorttable-long_size-unused-but-set-global-v1-1-8a96b88697e5@kernel.org>
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>
--
Nicolas
next prev parent reply other threads:[~2026-09-04 19:34 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 [this message]
2026-09-08 23:37 ` Nathan Chancellor
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=20260904-dancing-cobalt-ibex-8a039c@l-nschier-aarch64 \
--to=n.schier@fritz.com \
--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=nathan@kernel.org \
--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®