[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGG=3QVWzg21wL3fjcKmNGW5xP-c9p7bDm3j598J3-j+GDPq+A@mail.gmail.com>
Date: Mon, 26 Jul 2021 14:01:24 -0700
From: Bill Wendling <morbo@...gle.com>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
clang-built-linux <clang-built-linux@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] base: mark 'no_warn' as unused
On Mon, Jul 26, 2021 at 1:47 PM Nathan Chancellor <nathan@...nel.org> wrote:
>
> + Greg and Rafael as the maintainer and reviewer of
> drivers/base/module.c respectively, drop everyone else.
>
> Original post:
>
> https://lore.kernel.org/r/20210726201924.3202278-2-morbo@google.com/
>
> On 7/26/2021 1:19 PM, 'Bill Wendling' via Clang Built Linux wrote:
> > Fix the following build warning:
> >
> > drivers/base/module.c:36:6: error: variable 'no_warn' set but not used [-Werror,-Wunused-but-set-variable]
> > int no_warn;
> >
> > This variable is used to remove another warning, but causes a warning
> > itself. Mark it as 'unused' to avoid that.
> >
> > Signed-off-by: Bill Wendling <morbo@...gle.com>
>
> Even though they evaluate to the same thing, it might be worth using
> "__always_unused" here because it is :)
>
I thought about that, but went with the softer option in the (probably
very) unlikely event that it will be used in the future. :-) I'll be
happy to resubmit a new patch though.
-bw
> Regardless:
>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>
>
> > ---
> > drivers/base/module.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/module.c b/drivers/base/module.c
> > index 46ad4d636731..10494336d601 100644
> > --- a/drivers/base/module.c
> > +++ b/drivers/base/module.c
> > @@ -33,7 +33,7 @@ static void module_create_drivers_dir(struct module_kobject *mk)
> > void module_add_driver(struct module *mod, struct device_driver *drv)
> > {
> > char *driver_name;
> > - int no_warn;
> > + int __maybe_unused no_warn;
> > struct module_kobject *mk = NULL;
> >
> > if (!drv)
> >
Powered by blists - more mailing lists