linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fs: d_path: include internal.h
@ 2023-05-16 19:54 Arnd Bergmann
  2023-05-16 19:56 ` [PATCH 2/2] fs: pipe: reveal missing function protoypes Arnd Bergmann
  2023-05-17  7:18 ` [PATCH 1/2] fs: d_path: include internal.h Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-16 19:54 UTC (permalink / raw)
  To: Alexander Viro, Christian Brauner
  Cc: Arnd Bergmann, linux-fsdevel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

make W=1 warns about a missing prototype that is defined but
not visible at point where simple_dname() is defined:

fs/d_path.c:317:7: error: no previous prototype for 'simple_dname' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/d_path.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/d_path.c b/fs/d_path.c
index 56a6ee4c6331..5f4da5c8d5db 100644
--- a/fs/d_path.c
+++ b/fs/d_path.c
@@ -7,6 +7,7 @@
 #include <linux/slab.h>
 #include <linux/prefetch.h>
 #include "mount.h"
+#include "internal.h"
 
 struct prepend_buffer {
 	char *buf;
-- 
2.39.2


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

* [PATCH 2/2] fs: pipe: reveal missing function protoypes
  2023-05-16 19:54 [PATCH 1/2] fs: d_path: include internal.h Arnd Bergmann
@ 2023-05-16 19:56 ` Arnd Bergmann
  2023-05-17  7:18 ` [PATCH 1/2] fs: d_path: include internal.h Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-16 19:56 UTC (permalink / raw)
  To: viro, brauner, David Howells; +Cc: linux-fsdevel, Arnd Bergmann, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

A couple of functions from fs/pipe.c are used both internally
and for the watch queue code, but the declaration is only
visible when the latter is enabled:

fs/pipe.c:1254:5: error: no previous prototype for 'pipe_resize_ring'
fs/pipe.c:758:15: error: no previous prototype for 'account_pipe_buffers'
fs/pipe.c:764:6: error: no previous prototype for 'too_many_pipe_buffers_soft'
fs/pipe.c:771:6: error: no previous prototype for 'too_many_pipe_buffers_hard'
fs/pipe.c:777:6: error: no previous prototype for 'pipe_is_unprivileged_user'

Make the visible unconditionally to avoid these warnings.

Fixes: c73be61cede5 ("pipe: Add general notification queue support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/pipe_fs_i.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index d2c3f16cf6b1..02e0086b10f6 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -261,18 +261,14 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
 
 extern const struct pipe_buf_operations nosteal_pipe_buf_ops;
 
-#ifdef CONFIG_WATCH_QUEUE
 unsigned long account_pipe_buffers(struct user_struct *user,
 				   unsigned long old, unsigned long new);
 bool too_many_pipe_buffers_soft(unsigned long user_bufs);
 bool too_many_pipe_buffers_hard(unsigned long user_bufs);
 bool pipe_is_unprivileged_user(void);
-#endif
 
 /* for F_SETPIPE_SZ and F_GETPIPE_SZ */
-#ifdef CONFIG_WATCH_QUEUE
 int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots);
-#endif
 long pipe_fcntl(struct file *, unsigned int, unsigned long arg);
 struct pipe_inode_info *get_pipe_info(struct file *file, bool for_splice);
 
-- 
2.39.2


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

* Re: [PATCH 1/2] fs: d_path: include internal.h
  2023-05-16 19:54 [PATCH 1/2] fs: d_path: include internal.h Arnd Bergmann
  2023-05-16 19:56 ` [PATCH 2/2] fs: pipe: reveal missing function protoypes Arnd Bergmann
@ 2023-05-17  7:18 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2023-05-17  7:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Christian Brauner, Arnd Bergmann, linux-fsdevel, linux-kernel,
	Alexander Viro

On Tue, 16 May 2023 21:54:38 +0200, Arnd Bergmann wrote:
> make W=1 warns about a missing prototype that is defined but
> not visible at point where simple_dname() is defined:
> 
> fs/d_path.c:317:7: error: no previous prototype for 'simple_dname' [-Werror=missing-prototypes]
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/2] fs: d_path: include internal.h
      https://git.kernel.org/vfs/vfs/c/fb385a13fc9a
[2/2] fs: pipe: reveal missing function protoypes
      https://git.kernel.org/vfs/vfs/c/bf0603ebb9ee

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

end of thread, other threads:[~2023-05-17  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16 19:54 [PATCH 1/2] fs: d_path: include internal.h Arnd Bergmann
2023-05-16 19:56 ` [PATCH 2/2] fs: pipe: reveal missing function protoypes Arnd Bergmann
2023-05-17  7:18 ` [PATCH 1/2] fs: d_path: include internal.h Christian Brauner

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).