lkml.org 
[lkml]   [2023]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: compaction: remove incorrect #ifdef checks
On Wed, Mar 29, 2023 at 10:02:41AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Without CONFIG_SYSCTL, the compiler warns about a few unused functions:
>
> mm/compaction.c:3076:12: error: 'proc_dointvec_minmax_warn_RT_change' defined but not used [-Werror=unused-function]
> mm/compaction.c:2780:12: error: 'sysctl_compaction_handler' defined but not used [-Werror=unused-function]
> mm/compaction.c:2750:12: error: 'compaction_proactiveness_sysctl_handler' defined but not used [-Werror=unused-function]
>
> The #ifdef is actually not necessary here, as the alternative
> register_sysctl_init() stub function does not use its argument, which
> lets the compiler drop the rest implicitly, while avoiding the warning.
>
> Fixes: c521126610c3 ("mm: compaction: move compaction sysctl to its own file")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks! Queued up.

Luis

\
 
 \ /
  Last update: 2023-03-29 10:52    [W:0.046 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site