All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Steven Rostedt <rostedt@goodmis.org>
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 18:24:15 -0700	[thread overview]
Message-ID: <6cccb650-9aef-f16c-7ec5-53d3042af292@roeck-us.net> (raw)
In-Reply-To: <20210421204139.669f5c22@oasis.local.home>

On 4/21/21 5:41 PM, Steven Rostedt wrote:
> 
> 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/
> 

Sorry, I missed the other one.

Guenter

> -- 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) {
>>  			/*
> 


  reply	other threads:[~2021-04-22  1:24 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
2021-04-22  1:24   ` Guenter Roeck [this message]
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=6cccb650-9aef-f16c-7ec5-53d3042af292@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=ardb@kernel.org \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.