From dd755746a353d04b13773a6c14be1b34c399da7a Mon Sep 17 00:00:00 2001 From: "Tse-Chia.Chang" Date: Fri, 3 May 2024 12:12:33 +0800 Subject: [PATCH] Fix errors raised by missing-prototypes The recent upstream(commit 0fcb708) in the Linux kernel globally enforce function prototype checks. This means that it's crucial for each function to have a declaration to validate that both the caller and the callee expect the same argument types. Failure to comply with this requirement may result in real bugs due to mismatched prototypes. Therefore, in this commit, we need to add function prototypes to the header files or declare functions with static to ensure compatibility with these changes. --- simplefs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simplefs.h b/simplefs.h index 84d5e60..158468d 100644 --- a/simplefs.h +++ b/simplefs.h @@ -108,12 +108,19 @@ struct simplefs_dir_block { /* superblock functions */ int simplefs_fill_super(struct super_block *sb, void *data, int silent); +void simplefs_kill_sb(struct super_block *sb); /* inode functions */ int simplefs_init_inode_cache(void); void simplefs_destroy_inode_cache(void); struct inode *simplefs_iget(struct super_block *sb, unsigned long ino); +/* dentry function */ +struct dentry *simplefs_mount(struct file_system_type *fs_type, + int flags, + const char *dev_name, + void *data); + /* file functions */ extern const struct file_operations simplefs_file_ops; extern const struct file_operations simplefs_dir_ops;