Skip to content

Commit 5ef03db

Browse files
arndbAl Viro
authored andcommitted
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: 3f3942a ("proc: introduce proc_create_single{,_data}") Cc: Christoph Hellwig <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 96362fb commit 5ef03db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ void xfs_stats_clearall(struct xfsstats __percpu *stats)
113113
}
114114
}
115115

116+
#ifdef CONFIG_PROC_FS
116117
/* legacy quota interfaces */
117118
#ifdef CONFIG_XFS_QUOTA
118119
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)
137138
}
138139
#endif /* CONFIG_XFS_QUOTA */
139140

140-
#ifdef CONFIG_PROC_FS
141141
int
142142
xfs_init_procfs(void)
143143
{

0 commit comments

Comments
 (0)