Re: [PATCH] [v2] module: don't ignore sysfs_create_link() failures

2024-03-26 Thread Arnd Bergmann
On Sat, Mar 23, 2024, at 17:50, Greg Kroah-Hartman wrote: > On Fri, Mar 22, 2024 at 06:39:11PM +0100, Arnd Bergmann wrote: >> diff --git a/drivers/base/bus.c b/drivers/base/bus.c >> index daee55c9b2d9..7ef75b60d331 100644 >> --- a/drivers/base/bus.c >> +++ b/drivers/base/bus.c >> @@ -674,7 +674,12

Re: [PATCH] [v2] module: don't ignore sysfs_create_link() failures

2024-03-23 Thread Greg Kroah-Hartman
On Fri, Mar 22, 2024 at 06:39:11PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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

[PATCH] [v2] module: don't ignore sysfs_create_link() failures

2024-03-22 Thread Arnd Bergmann
From: Arnd Bergmann 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: