From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB0D1C433ED for ; Thu, 22 Apr 2021 00:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6989060698 for ; Thu, 22 Apr 2021 00:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236417AbhDVAmQ convert rfc822-to-8bit (ORCPT ); Wed, 21 Apr 2021 20:42:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:36336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbhDVAmP (ORCPT ); Wed, 21 Apr 2021 20:42:15 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 36BF06140F; Thu, 22 Apr 2021 00:41:41 +0000 (UTC) Date: Wed, 21 Apr 2021 20:41:39 -0400 From: Steven Rostedt To: Guenter Roeck Cc: Peter Zijlstra , Josh Poimboeuf , Jason Baron , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: Re: [PATCH] static_call: Fix unused variable warning Message-ID: <20210421204139.669f5c22@oasis.local.home> In-Reply-To: <20210422003334.139452-1-linux@roeck-us.net> References: <20210422003334.139452-1-linux@roeck-us.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > Cc: Josh Poimboeuf > Signed-off-by: Guenter Roeck > --- > 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) { > /*