linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs, proc: hide unused xfs procfs helpers
@ 2018-05-25 15:16 Arnd Bergmann
  2018-05-25 16:22 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-05-25 15:16 UTC (permalink / raw)
  To: Al Viro
  Cc: Arnd Bergmann, Christoph Hellwig, Darrick J. Wong, linux-xfs,
	linux-kernel

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>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
The warning was caused by a patch in Al's VFS tree, so the fix
needs to go through the same one.
---
 fs/xfs/xfs_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 	}
 }
 
+#ifdef CONFIG_PROC_FS
 /* legacy quota interfaces */
 #ifdef CONFIG_XFS_QUOTA
 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)
 }
 #endif /* CONFIG_XFS_QUOTA */
 
-#ifdef CONFIG_PROC_FS
 int
 xfs_init_procfs(void)
 {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs, proc: hide unused xfs procfs helpers
  2018-05-25 15:16 [PATCH] xfs, proc: hide unused xfs procfs helpers Arnd Bergmann
@ 2018-05-25 16:22 ` Christoph Hellwig
  2018-05-26  0:34   ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2018-05-25 16:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Al Viro, Christoph Hellwig, Darrick J. Wong, linux-xfs, linux-kernel

Looks fine to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

Al, can you pick this up?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs, proc: hide unused xfs procfs helpers
  2018-05-25 16:22 ` Christoph Hellwig
@ 2018-05-26  0:34   ` Al Viro
  0 siblings, 0 replies; 3+ messages in thread
From: Al Viro @ 2018-05-26  0:34 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Arnd Bergmann, Darrick J. Wong, linux-xfs, linux-kernel

On Fri, May 25, 2018 at 06:22:04PM +0200, Christoph Hellwig wrote:
> Looks fine to me:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> Al, can you pick this up?

Done

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-26  0:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 15:16 [PATCH] xfs, proc: hide unused xfs procfs helpers Arnd Bergmann
2018-05-25 16:22 ` Christoph Hellwig
2018-05-26  0:34   ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).