lkml.org 
[lkml]   [2021]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] fs/dcache: avoid unused-function warning
On Fri, Dec 03, 2021 at 08:01:02PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Now that 'dentry_stat' is marked 'static', we can run into this warning:
>
> fs/dcache.c:128:29: error: 'dentry_stat' defined but not used [-Werror=unused-variable]
> 128 | static struct dentry_stat_t dentry_stat = {
>
> Hide it in the same #ifdef as its only references.
>
> Fixes: f0eea17ca8da ("fs: move dcache 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.026 / U:4.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site