Re: [PATCH] module: silence warning about unused 'no_warn' variable

2024-03-22 Thread Greg Kroah-Hartman
On Fri, Mar 22, 2024 at 02:20:05PM +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] module: silence warning about unused 'no_warn' variable

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: