Thread (2 messages) 2 messages, 2 authors, 2022-07-01

Re: [PATCH] module: Fix "warning: variable 'exit' set but not used"

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2022-07-01 21:46:13
Also in: lkml

On Sun, Jun 12, 2022 at 05:33:20PM +0200, Christophe Leroy wrote:
When CONFIG_MODULE_UNLOAD is not selected, 'exit' is
set but never used.

It is not possible to replace the #ifdef CONFIG_MODULE_UNLOAD by
IS_ENABLED(CONFIG_MODULE_UNLOAD) because mod->exit doesn't exist
when CONFIG_MODULE_UNLOAD is not selected.

And because of the rcu_read_lock_sched() section it is not easy
to regroup everything in a single #ifdef. Let's regroup partially
and add missing #ifdef to completely opt out the use of
'exit' when CONFIG_MODULE_UNLOAD is not selected.

Reported-by: kernel test robot <redacted>
Signed-off-by: Christophe Leroy <redacted>
Queued up thanks!

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help