Re: [PATCH 1/2] fs/inode: avoid unused-variable warning

From: Christian Brauner
Date: Sat Dec 04 2021 - 06:56:48 EST


On Fri, Dec 03, 2021 at 08:01:01PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Now that 'inodes_stat' is marked 'static', it causes a harmless warning
> whenever it is unused:
>
> fs/inode.c:73:29: error: 'inodes_stat' defined but not used [-Werror=unused-variable]
> 73 | static struct inodes_stat_t inodes_stat;
>
> Move it into the #ifdef that guards its only references.
>
> Fixes: 245314851782 ("fs: move inode sysctls to its own file")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---

Looks good.
Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx>