From: Steven Rostedt <rostedt@goodmis.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Jason Baron <jbaron@akamai.com>, Ard Biesheuvel <ardb@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] static_call: Fix unused variable warning
Date: Wed, 21 Apr 2021 20:41:39 -0400 [thread overview]
Message-ID: <20210421204139.669f5c22@oasis.local.home> (raw)
In-Reply-To: <20210422003334.139452-1-linux@roeck-us.net>
Second patch with the exact same update. Perhaps we should take one
before we get more of them ;-)
https://lore.kernel.org/lkml/20210416194300.3952208-1-cmllamas@google.com/
-- Steve
On Wed, 21 Apr 2021 17:33:34 -0700
Guenter Roeck <linux@roeck-us.net> wrote:
> If CONFIG_MODULES=n, the following build warning is reported.
>
> kernel/static_call.c: In function ‘__static_call_update’:
> kernel/static_call.c:153:18: warning: unused variable ‘mod’
>
> Mark the variable as __maybe_unused to fix the problem.
>
> Fixes: 9183c3f9ed71 ("static_call: Add inline static call infrastructure")
> Reported-by: Zach Reizner <zachr@google.com>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> kernel/static_call.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/static_call.c b/kernel/static_call.c
> index 2c5950b0b90e..8211a34251f8 100644
> --- a/kernel/static_call.c
> +++ b/kernel/static_call.c
> @@ -150,7 +150,7 @@ void __static_call_update(struct static_call_key *key, void *tramp, void *func)
>
> for (site_mod = &first; site_mod; site_mod = site_mod->next) {
> bool init = system_state < SYSTEM_RUNNING;
> - struct module *mod = site_mod->mod;
> + struct module __maybe_unused *mod = site_mod->mod;
>
> if (!site_mod->sites) {
> /*
next prev parent reply other threads:[~2021-04-22 0:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 0:33 [PATCH] static_call: Fix unused variable warning Guenter Roeck
2021-04-22 0:41 ` Steven Rostedt [this message]
2021-04-22 1:24 ` Guenter Roeck
2021-04-22 1:33 ` Steven Rostedt
2021-04-22 1:45 ` Guenter Roeck
2021-04-22 2:38 ` Steven Rostedt
2021-04-22 7:20 ` Peter Zijlstra
2021-04-22 14:01 ` Guenter Roeck
2021-04-22 16:13 ` Peter Zijlstra
2021-04-22 18:01 ` Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2021-04-16 19:43 [PATCH] static_call: fix " Carlos Llamas
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=20210421204139.669f5c22@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=ardb@kernel.org \
--cc=jbaron@akamai.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=peterz@infradead.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