lkml.org 
[lkml]   [2021]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] fs/inode: avoid unused-variable warning
On Fri, Dec 03, 2021 at 08:01:01PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@arndb.de>
> ---

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

\
 
 \ /
  Last update: 2021-12-04 12:57    [W:0.038 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site