[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yr9rEzCse4GSOEMU@bombadil.infradead.org>
Date: Fri, 1 Jul 2022 14:45:55 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] module: Fix "warning: variable 'exit' set but not used"
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 <lkp@...el.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
Queued up thanks!
Luis
Powered by blists - more mailing lists