Skip to contentSkip to conversation

fsnotify/fdinfo: include fdinfo.h for inotify_show_fdinfo()

PATCH In review Eric Biggers 2 participants 2 messages Nov 15, 2018 – Nov 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsnotify/fdinfo: include fdinfo.h for inotify_show_fdinfo()

From: Eric Biggers <[email protected]>

inotify_show_fdinfo() is defined in fs/notify/fdinfo.c and declared in fs/notify/fdinfo.h, but the declaration isn't included at the point of the definition. Include the header to enforce that the definition matches the declaration.

This addresses a gcc warning when -Wmissing-prototypes is enabled.

---
 fs/notify/fdinfo.c | 1 +
 1 file changed, 1 insertion(+)
fs/notify/fdinfo.c +1 -0
index 348a184bcdda3..1e2bfd26b3521 100644
@@ -15,6 +15,7 @@
 #include <linux/exportfs.h>
 
 #include "inotify/inotify.h"
+#include "fdinfo.h"
 #include "fsnotify.h"
 
 #if defined(CONFIG_PROC_FS)
Signature · 1 line
2.19.1.930.g4563a0d9d0-goog
maintainer
#1 lore raw
Quoted 10 lines · Eric Biggers

From: Eric Biggers <[email protected]>

inotify_show_fdinfo() is defined in fs/notify/fdinfo.c and declared in fs/notify/fdinfo.h, but the declaration isn't included at the point of the definition. Include the header to enforce that the definition matches the declaration.

This addresses a gcc warning when -Wmissing-prototypes is enabled.

Good point. Patch applied. Thanks!

Honza

Quoted 19 lines
---
 fs/notify/fdinfo.c | 1 +
 1 file changed, 1 insertion(+)
fs/notify/fdinfo.c +1 -0
index 348a184bcdda3..1e2bfd26b3521 100644
@@ -15,6 +15,7 @@
 #include <linux/exportfs.h>
 
 #include "inotify/inotify.h"
+#include "fdinfo.h"
 #include "fsnotify.h"
 
 #if defined(CONFIG_PROC_FS)
Signature · 1 line
2.19.1.930.g4563a0d9d0-goog
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR