Remove the unnecessary 'extern' keywords from function declarations. This makes it so that we don't have a mix of both styles, so it won't be ambiguous what to use in new fscrypt patches. This also makes the code shorter and matches the 'checkpatch --strict' expectation.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -108,22 +108,21 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry) · 107 unmodified lines | ||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /* crypto.c */ |
| 111 | −extern void fscrypt_enqueue_decrypt_work(struct work_struct *); | |
| 112 | − | |
| 113 | −extern struct page *fscrypt_encrypt_pagecache_blocks(struct page *page, | |
| 114 | − unsigned int len, | |
| 115 | − unsigned int offs, | |
| 116 | − gfp_t gfp_flags); | |
| 117 | −extern int fscrypt_encrypt_block_inplace(const struct inode *inode, | |
| 118 | − struct page *page, unsigned int len, | |
| 119 | − unsigned int offs, u64 lblk_num, | |
| 120 | − gfp_t gfp_flags); | |
| 121 | − | |
| 122 | −extern int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len, | |
| 123 | − unsigned int offs); | |
| 124 | −extern int fscrypt_decrypt_block_inplace(const struct inode *inode, | |
| 125 | − struct page *page, unsigned int len, | |
| 126 | − unsigned int offs, u64 lblk_num); | |
| 111 | +void fscrypt_enqueue_decrypt_work(struct work_struct *); | |
| 112 | + | |
| 113 | +struct page *fscrypt_encrypt_pagecache_blocks(struct page *page, | |
| 114 | + unsigned int len, | |
| 115 | + unsigned int offs, | |
| 116 | + gfp_t gfp_flags); | |
| 117 | +int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page, | |
| 118 | + unsigned int len, unsigned int offs, | |
| 119 | + u64 lblk_num, gfp_t gfp_flags); | |
| 120 | + | |
| 121 | +int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len, | |
| 122 | + unsigned int offs); | |
| 123 | +int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page, | |
| 124 | + unsigned int len, unsigned int offs, | |
| 125 | + u64 lblk_num); | |
| 127 | 126 | |
| 128 | 127 | static inline bool fscrypt_is_bounce_page(struct page *page) |
| 129 | 128 | { |
| @@ -135,81 +134,74 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page) · 5 unmodified lines | ||
| 135 | 134 | return (struct page *)page_private(bounce_page); |
| 136 | 135 | } |
| 137 | 136 | |
| 138 | −extern void fscrypt_free_bounce_page(struct page *bounce_page); | |
| 137 | +void fscrypt_free_bounce_page(struct page *bounce_page); | |
| 139 | 138 | |
| 140 | 139 | /* policy.c */ |
| 141 | −extern int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg); | |
| 142 | −extern int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg); | |
| 143 | −extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg); | |
| 144 | −extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); | |
| 145 | −extern int fscrypt_has_permitted_context(struct inode *parent, | |
| 146 | − struct inode *child); | |
| 147 | −extern int fscrypt_inherit_context(struct inode *parent, struct inode *child, | |
| 148 | − void *fs_data, bool preload); | |
| 140 | +int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg); | |
| 141 | +int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg); | |
| 142 | +int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg); | |
| 143 | +int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); | |
| 144 | +int fscrypt_has_permitted_context(struct inode *parent, struct inode *child); | |
| 145 | +int fscrypt_inherit_context(struct inode *parent, struct inode *child, | |
| 146 | + void *fs_data, bool preload); | |
| 149 | 147 | |
| 150 | 148 | /* keyring.c */ |
| 151 | −extern void fscrypt_sb_free(struct super_block *sb); | |
| 152 | −extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); | |
| 153 | −extern int fscrypt_ioctl_remove_key(struct file *filp, void __user *arg); | |
| 154 | −extern int fscrypt_ioctl_remove_key_all_users(struct file *filp, | |
| 155 | − void __user *arg); | |
| 156 | −extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg); | |
| 149 | +void fscrypt_sb_free(struct super_block *sb); | |
| 150 | +int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); | |
| 151 | +int fscrypt_ioctl_remove_key(struct file *filp, void __user *arg); | |
| 152 | +int fscrypt_ioctl_remove_key_all_users(struct file *filp, void __user *arg); | |
| 153 | +int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg); | |
| 157 | 154 | |
| 158 | 155 | /* keysetup.c */ |
| 159 | −extern int fscrypt_get_encryption_info(struct inode *inode); | |
| 160 | −extern void fscrypt_put_encryption_info(struct inode *inode); | |
| 161 | −extern void fscrypt_free_inode(struct inode *inode); | |
| 162 | −extern int fscrypt_drop_inode(struct inode *inode); | |
| 156 | +int fscrypt_get_encryption_info(struct inode *inode); | |
| 157 | +void fscrypt_put_encryption_info(struct inode *inode); | |
| 158 | +void fscrypt_free_inode(struct inode *inode); | |
| 159 | +int fscrypt_drop_inode(struct inode *inode); | |
| 163 | 160 | |
| 164 | 161 | /* fname.c */ |
| 165 | −extern int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname, | |
| 166 | − int lookup, struct fscrypt_name *fname); | |
| 162 | +int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname, | |
| 163 | + int lookup, struct fscrypt_name *fname); | |
| 167 | 164 | |
| 168 | 165 | static inline void fscrypt_free_filename(struct fscrypt_name *fname) |
| 169 | 166 | { |
| 170 | 167 | kfree(fname->crypto_buf.name); |
| 171 | 168 | } |
| 172 | 169 | |
| 173 | −extern int fscrypt_fname_alloc_buffer(const struct inode *inode, | |
| 174 | − u32 max_encrypted_len, | |
| 175 | − struct fscrypt_str *crypto_str); | |
| 176 | −extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str); | |
| 177 | −extern int fscrypt_fname_disk_to_usr(const struct inode *inode, | |
| 178 | − u32 hash, u32 minor_hash, | |
| 179 | − const struct fscrypt_str *iname, | |
| 180 | − struct fscrypt_str *oname); | |
| 181 | −extern bool fscrypt_match_name(const struct fscrypt_name *fname, | |
| 182 | − const u8 *de_name, u32 de_name_len); | |
| 183 | −extern u64 fscrypt_fname_siphash(const struct inode *dir, | |
| 184 | − const struct qstr *name); | |
| 170 | +int fscrypt_fname_alloc_buffer(const struct inode *inode, u32 max_encrypted_len, | |
| 171 | + struct fscrypt_str *crypto_str); | |
| 172 | +void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str); | |
| 173 | +int fscrypt_fname_disk_to_usr(const struct inode *inode, | |
| 174 | + u32 hash, u32 minor_hash, | |
| 175 | + const struct fscrypt_str *iname, | |
| 176 | + struct fscrypt_str *oname); | |
| 177 | +bool fscrypt_match_name(const struct fscrypt_name *fname, | |
| 178 | + const u8 *de_name, u32 de_name_len); | |
| 179 | +u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name); | |
| 185 | 180 | |
| 186 | 181 | /* bio.c */ |
| 187 | −extern void fscrypt_decrypt_bio(struct bio *bio); | |
| 188 | −extern int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, | |
| 189 | − sector_t pblk, unsigned int len); | |
| 182 | +void fscrypt_decrypt_bio(struct bio *bio); | |
| 183 | +int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, | |
| 184 | + sector_t pblk, unsigned int len); | |
| 190 | 185 | |
| 191 | 186 | /* hooks.c */ |
| 192 | −extern int fscrypt_file_open(struct inode *inode, struct file *filp); | |
| 193 | −extern int __fscrypt_prepare_link(struct inode *inode, struct inode *dir, | |
| 194 | − struct dentry *dentry); | |
| 195 | −extern int __fscrypt_prepare_rename(struct inode *old_dir, | |
| 196 | − struct dentry *old_dentry, | |
| 197 | − struct inode *new_dir, | |
| 198 | − struct dentry *new_dentry, | |
| 199 | − unsigned int flags); | |
| 200 | −extern int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry, | |
| 201 | − struct fscrypt_name *fname); | |
| 202 | −extern int fscrypt_prepare_setflags(struct inode *inode, | |
| 203 | − unsigned int oldflags, unsigned int flags); | |
| 204 | −extern int __fscrypt_prepare_symlink(struct inode *dir, unsigned int len, | |
| 205 | − unsigned int max_len, | |
| 206 | − struct fscrypt_str *disk_link); | |
| 207 | −extern int __fscrypt_encrypt_symlink(struct inode *inode, const char *target, | |
| 208 | − unsigned int len, | |
| 209 | − struct fscrypt_str *disk_link); | |
| 210 | −extern const char *fscrypt_get_symlink(struct inode *inode, const void *caddr, | |
| 211 | − unsigned int max_size, | |
| 212 | − struct delayed_call *done); | |
| 187 | +int fscrypt_file_open(struct inode *inode, struct file *filp); | |
| 188 | +int __fscrypt_prepare_link(struct inode *inode, struct inode *dir, | |
| 189 | + struct dentry *dentry); | |
| 190 | +int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, | |
| 191 | + struct inode *new_dir, struct dentry *new_dentry, | |
| 192 | + unsigned int flags); | |
| 193 | +int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry, | |
| 194 | + struct fscrypt_name *fname); | |
| 195 | +int fscrypt_prepare_setflags(struct inode *inode, | |
| 196 | + unsigned int oldflags, unsigned int flags); | |
| 197 | +int __fscrypt_prepare_symlink(struct inode *dir, unsigned int len, | |
| 198 | + unsigned int max_len, | |
| 199 | + struct fscrypt_str *disk_link); | |
| 200 | +int __fscrypt_encrypt_symlink(struct inode *inode, const char *target, | |
| 201 | + unsigned int len, struct fscrypt_str *disk_link); | |
| 202 | +const char *fscrypt_get_symlink(struct inode *inode, const void *caddr, | |
| 203 | + unsigned int max_size, | |
| 204 | + struct delayed_call *done); | |
| 213 | 205 | static inline void fscrypt_set_ops(struct super_block *sb, |
| 214 | 206 | const struct fscrypt_operations *s_cop) |
| 215 | 207 | { |