Commit 3634634edd49c115da931998b9540bcc17665b05

Authored by Harvey Harrison
Committed by Greg Kroah-Hartman
1 parent c1fe539a7e

debugfs: fix sparse warnings

extern does not belong in C files, move declaration to linux/debugfs.h
fs/debugfs/file.c:42:30: warning: symbol 'debugfs_file_operations' was not declared. Should it be static?
fs/debugfs/file.c:54:31: warning: symbol 'debugfs_link_operations' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 2 changed files with 5 additions and 4 deletions Side-by-side Diff

... ... @@ -29,10 +29,6 @@
29 29  
30 30 #define DEBUGFS_MAGIC 0x64626720
31 31  
32   -/* declared over in file.c */
33   -extern struct file_operations debugfs_file_operations;
34   -extern struct inode_operations debugfs_link_operations;
35   -
36 32 static struct vfsmount *debugfs_mount;
37 33 static int debugfs_mount_count;
38 34  
include/linux/debugfs.h
... ... @@ -27,6 +27,11 @@
27 27 };
28 28  
29 29 #if defined(CONFIG_DEBUG_FS)
  30 +
  31 +/* declared over in file.c */
  32 +extern const struct file_operations debugfs_file_operations;
  33 +extern const struct inode_operations debugfs_link_operations;
  34 +
30 35 struct dentry *debugfs_create_file(const char *name, mode_t mode,
31 36 struct dentry *parent, void *data,
32 37 const struct file_operations *fops);