* [PATCH] fuse: dev: avoid a build warning when PROC_FS is not set
@ 2025-05-14 21:32 Randy Dunlap
2025-05-15 2:10 ` Chen Linxuan
2025-05-15 9:08 ` Miklos Szeredi
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2025-05-14 21:32 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Miklos Szeredi, Miklos Szeredi, linux-fsdevel,
Chen Linxuan
Fix a build warning when CONFIG_PROC_FS is not set by surrounding the
function with #ifdef CONFIG_PROC_FS.
fs/fuse/dev.c:2620:13: warning: 'fuse_dev_show_fdinfo' defined but not used [-Wunused-function]
2620 | static void fuse_dev_show_fdinfo(struct seq_file *seq, struct file *file)
Fixes: 514d9210bf45 ("fs: fuse: add dev id to /dev/fuse fdinfo")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: Chen Linxuan <chenlinxuan@uniontech.com>
---
fs/fuse/dev.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-next-20250514.orig/fs/fuse/dev.c
+++ linux-next-20250514/fs/fuse/dev.c
@@ -2617,6 +2617,7 @@ static long fuse_dev_ioctl(struct file *
}
}
+#ifdef CONFIG_PROC_FS
static void fuse_dev_show_fdinfo(struct seq_file *seq, struct file *file)
{
struct fuse_dev *fud = fuse_get_dev(file);
@@ -2625,6 +2626,7 @@ static void fuse_dev_show_fdinfo(struct
seq_printf(seq, "fuse_connection:\t%u\n", fud->fc->dev);
}
+#endif
const struct file_operations fuse_dev_operations = {
.owner = THIS_MODULE,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fuse: dev: avoid a build warning when PROC_FS is not set
2025-05-14 21:32 [PATCH] fuse: dev: avoid a build warning when PROC_FS is not set Randy Dunlap
@ 2025-05-15 2:10 ` Chen Linxuan
2025-05-15 9:08 ` Miklos Szeredi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Linxuan @ 2025-05-15 2:10 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Miklos Szeredi, Miklos Szeredi, linux-fsdevel,
Chen Linxuan
Reviewed-by: Chen Linxuan <chenlinxuan@uniontech.com>
On Thu, May 15, 2025 at 5:42 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix a build warning when CONFIG_PROC_FS is not set by surrounding the
> function with #ifdef CONFIG_PROC_FS.
>
> fs/fuse/dev.c:2620:13: warning: 'fuse_dev_show_fdinfo' defined but not used [-Wunused-function]
> 2620 | static void fuse_dev_show_fdinfo(struct seq_file *seq, struct file *file)
>
> Fixes: 514d9210bf45 ("fs: fuse: add dev id to /dev/fuse fdinfo")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Miklos Szeredi <miklos@szeredi.hu>
> Cc: Miklos Szeredi <mszeredi@redhat.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: Chen Linxuan <chenlinxuan@uniontech.com>
> ---
> fs/fuse/dev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-next-20250514.orig/fs/fuse/dev.c
> +++ linux-next-20250514/fs/fuse/dev.c
> @@ -2617,6 +2617,7 @@ static long fuse_dev_ioctl(struct file *
> }
> }
>
> +#ifdef CONFIG_PROC_FS
> static void fuse_dev_show_fdinfo(struct seq_file *seq, struct file *file)
> {
> struct fuse_dev *fud = fuse_get_dev(file);
> @@ -2625,6 +2626,7 @@ static void fuse_dev_show_fdinfo(struct
>
> seq_printf(seq, "fuse_connection:\t%u\n", fud->fc->dev);
> }
> +#endif
>
> const struct file_operations fuse_dev_operations = {
> .owner = THIS_MODULE,
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fuse: dev: avoid a build warning when PROC_FS is not set
2025-05-14 21:32 [PATCH] fuse: dev: avoid a build warning when PROC_FS is not set Randy Dunlap
2025-05-15 2:10 ` Chen Linxuan
@ 2025-05-15 9:08 ` Miklos Szeredi
1 sibling, 0 replies; 3+ messages in thread
From: Miklos Szeredi @ 2025-05-15 9:08 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kernel, Miklos Szeredi, linux-fsdevel, Chen Linxuan
On Wed, 14 May 2025 at 23:32, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix a build warning when CONFIG_PROC_FS is not set by surrounding the
> function with #ifdef CONFIG_PROC_FS.
>
> fs/fuse/dev.c:2620:13: warning: 'fuse_dev_show_fdinfo' defined but not used [-Wunused-function]
> 2620 | static void fuse_dev_show_fdinfo(struct seq_file *seq, struct file *file)
>
> Fixes: 514d9210bf45 ("fs: fuse: add dev id to /dev/fuse fdinfo")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Folded, thanks.
Miklos
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-15 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 21:32 [PATCH] fuse: dev: avoid a build warning when PROC_FS is not set Randy Dunlap
2025-05-15 2:10 ` Chen Linxuan
2025-05-15 9:08 ` Miklos Szeredi
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).