Skip to content

Commit 3634634

Browse files
hharrisongregkh
authored andcommitted
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>
1 parent c1fe539 commit 3634634

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎fs/debugfs/inode.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929

3030
#define DEBUGFS_MAGIC 0x64626720
3131

32-
/* declared over in file.c */
33-
extern struct file_operations debugfs_file_operations;
34-
extern struct inode_operations debugfs_link_operations;
35-
3632
static struct vfsmount *debugfs_mount;
3733
static int debugfs_mount_count;
3834

‎include/linux/debugfs.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ struct debugfs_blob_wrapper {
2727
};
2828

2929
#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+
3035
struct dentry *debugfs_create_file(const char *name, mode_t mode,
3136
struct dentry *parent, void *data,
3237
const struct file_operations *fops);

0 commit comments

Comments
 (0)