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

2024-04-11 Thread Greg Kroah-Hartman
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 > > > > The sysfs_create_link() return code is marked as __must_check, but the > > module_add_driver() function tries hard to not care, by

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

2024-04-08 Thread Luis Chamberlain
On Mon, Apr 08, 2024 at 10:05:58AM +0200, 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] [v4] module: don't ignore sysfs_create_link() failures

2024-04-08 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: