diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-05-25 11:16:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-25 20:43:08 -0400 |
commit | 5ef03dbd91855544cd4c7c1910c3ef5226ee87e8 (patch) | |
tree | 979e1b982982bfcae97691e99421cd210cff75cd | |
parent | 96362fb474bad694812c18cbc9943fe0f7e2ce31 (diff) |
xfs, proc: hide unused xfs procfs helpers
These two functions now trigger a warning when CONFIG_PROC_FS is disabled:
fs/xfs/xfs_stats.c:128:12: error: 'xqmstat_proc_show' defined but not used [-Werror=unused-function]
static int xqmstat_proc_show(struct seq_file *m, void *v)
^~~~~~~~~~~~~~~~~
fs/xfs/xfs_stats.c:118:12: error: 'xqm_proc_show' defined but not used [-Werror=unused-function]
static int xqm_proc_show(struct seq_file *m, void *v)
^~~~~~~~~~~~~
Previously, they were referenced from an unused 'static const' structure,
which is silently dropped by gcc.
We can address the warning by adding the same #ifdef around them that
hides the reference.
Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}")
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/xfs/xfs_stats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c index 04762a72e344..1cc79907b377 100644 --- a/fs/xfs/xfs_stats.c +++ b/fs/xfs/xfs_stats.c | |||
@@ -113,6 +113,7 @@ void xfs_stats_clearall(struct xfsstats __percpu *stats) | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | #ifdef CONFIG_PROC_FS | ||
116 | /* legacy quota interfaces */ | 117 | /* legacy quota interfaces */ |
117 | #ifdef CONFIG_XFS_QUOTA | 118 | #ifdef CONFIG_XFS_QUOTA |
118 | static int xqm_proc_show(struct seq_file *m, void *v) | 119 | static int xqm_proc_show(struct seq_file *m, void *v) |
@@ -137,7 +138,6 @@ static int xqmstat_proc_show(struct seq_file *m, void *v) | |||
137 | } | 138 | } |
138 | #endif /* CONFIG_XFS_QUOTA */ | 139 | #endif /* CONFIG_XFS_QUOTA */ |
139 | 140 | ||
140 | #ifdef CONFIG_PROC_FS | ||
141 | int | 141 | int |
142 | xfs_init_procfs(void) | 142 | xfs_init_procfs(void) |
143 | { | 143 | { |