[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2024041121-dab-battalion-e3e1@gregkh>
Date: Thu, 11 Apr 2024 14:42:31 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: Arnd Bergmann <arnd@...nel.org>, Arnd Bergmann <arnd@...db.de>,
linux-modules@...r.kernel.org,
"Rafael J. Wysocki" <rafael@...nel.org>,
Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v4] module: don't ignore sysfs_create_link() failures
On Mon, Apr 08, 2024 at 09:00:06AM -0700, Luis Chamberlain wrote:
> On Mon, Apr 08, 2024 at 10:05:58AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > The sysfs_create_link() return code is marked as __must_check, but the
> > module_add_driver() function tries hard to not care, by assigning the
> > return code to a variable. When building with 'make W=1', gcc still
> > warns because this variable is only assigned but not used:
> >
> > drivers/base/module.c: In function 'module_add_driver':
> > drivers/base/module.c:36:6: warning: variable 'no_warn' set but not used [-Wunused-but-set-variable]
> >
> > Rework the code to properly unwind and return the error code to the
> > caller. My reading of the original code was that it tries to
> > not fail when the links already exist, so keep ignoring -EEXIST
> > errors.
> >
> > Fixes: e17e0f51aeea ("Driver core: show drivers in /sys/module/")
> > Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
Oh right, I should apply this, sorry about that, will go do that now...
Powered by blists - more mailing lists