diff options
author | Joe Perches <joe@perches.com> | 2011-10-31 20:11:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:54 -0400 |
commit | b9075fa968a0a4347aef35e235e2995c0e57dddd (patch) | |
tree | cf9f9716784e790d8a43339653256d9cf9178ff3 /fs | |
parent | ae29bc92da01a2e9d278a9a58c3b307d41cc0254 (diff) |
treewide: use __printf not __attribute__((format(printf,...)))
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.
Done via script and a little typing.
$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'
[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 2 | ||||
-rw-r--r-- | fs/ext2/ext2.h | 8 | ||||
-rw-r--r-- | fs/ext4/ext4.h | 44 | ||||
-rw-r--r-- | fs/fat/fat.h | 9 | ||||
-rw-r--r-- | fs/gfs2/glock.h | 2 | ||||
-rw-r--r-- | fs/hpfs/hpfs_fn.h | 4 | ||||
-rw-r--r-- | fs/nilfs2/nilfs.h | 8 | ||||
-rw-r--r-- | fs/ntfs/debug.h | 15 | ||||
-rw-r--r-- | fs/ocfs2/super.h | 14 | ||||
-rw-r--r-- | fs/partitions/ldm.c | 16 | ||||
-rw-r--r-- | fs/udf/udfdecl.h | 4 | ||||
-rw-r--r-- | fs/ufs/ufs.h | 9 | ||||
-rw-r--r-- | fs/xfs/xfs_message.h | 42 |
13 files changed, 90 insertions, 87 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index b36c5572b3f3..54481a3b2c79 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -514,7 +514,7 @@ ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt) | |||
514 | 514 | ||
515 | #define ecryptfs_printk(type, fmt, arg...) \ | 515 | #define ecryptfs_printk(type, fmt, arg...) \ |
516 | __ecryptfs_printk(type "%s: " fmt, __func__, ## arg); | 516 | __ecryptfs_printk(type "%s: " fmt, __func__, ## arg); |
517 | __attribute__ ((format(printf, 1, 2))) | 517 | __printf(1, 2) |
518 | void __ecryptfs_printk(const char *fmt, ...); | 518 | void __ecryptfs_printk(const char *fmt, ...); |
519 | 519 | ||
520 | extern const struct file_operations ecryptfs_main_fops; | 520 | extern const struct file_operations ecryptfs_main_fops; |
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index af9fc89b1b2d..9a4e5e206d08 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h | |||
@@ -135,10 +135,10 @@ extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long); | |||
135 | struct dentry *ext2_get_parent(struct dentry *child); | 135 | struct dentry *ext2_get_parent(struct dentry *child); |
136 | 136 | ||
137 | /* super.c */ | 137 | /* super.c */ |
138 | extern void ext2_error (struct super_block *, const char *, const char *, ...) | 138 | extern __printf(3, 4) |
139 | __attribute__ ((format (printf, 3, 4))); | 139 | void ext2_error(struct super_block *, const char *, const char *, ...); |
140 | extern void ext2_msg(struct super_block *, const char *, const char *, ...) | 140 | extern __printf(3, 4) |
141 | __attribute__ ((format (printf, 3, 4))); | 141 | void ext2_msg(struct super_block *, const char *, const char *, ...); |
142 | extern void ext2_update_dynamic_rev (struct super_block *sb); | 142 | extern void ext2_update_dynamic_rev (struct super_block *sb); |
143 | extern void ext2_write_super (struct super_block *); | 143 | extern void ext2_write_super (struct super_block *); |
144 | 144 | ||
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b7d7bd0f066e..cec3145e532c 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1878,40 +1878,40 @@ extern int ext4_group_extend(struct super_block *sb, | |||
1878 | extern void *ext4_kvmalloc(size_t size, gfp_t flags); | 1878 | extern void *ext4_kvmalloc(size_t size, gfp_t flags); |
1879 | extern void *ext4_kvzalloc(size_t size, gfp_t flags); | 1879 | extern void *ext4_kvzalloc(size_t size, gfp_t flags); |
1880 | extern void ext4_kvfree(void *ptr); | 1880 | extern void ext4_kvfree(void *ptr); |
1881 | extern void __ext4_error(struct super_block *, const char *, unsigned int, | 1881 | extern __printf(4, 5) |
1882 | const char *, ...) | 1882 | void __ext4_error(struct super_block *, const char *, unsigned int, |
1883 | __attribute__ ((format (printf, 4, 5))); | 1883 | const char *, ...); |
1884 | #define ext4_error(sb, message...) __ext4_error(sb, __func__, \ | 1884 | #define ext4_error(sb, message...) __ext4_error(sb, __func__, \ |
1885 | __LINE__, ## message) | 1885 | __LINE__, ## message) |
1886 | extern void ext4_error_inode(struct inode *, const char *, unsigned int, | 1886 | extern __printf(5, 6) |
1887 | ext4_fsblk_t, const char *, ...) | 1887 | void ext4_error_inode(struct inode *, const char *, unsigned int, ext4_fsblk_t, |
1888 | __attribute__ ((format (printf, 5, 6))); | 1888 | const char *, ...); |
1889 | extern void ext4_error_file(struct file *, const char *, unsigned int, | 1889 | extern __printf(5, 6) |
1890 | ext4_fsblk_t, const char *, ...) | 1890 | void ext4_error_file(struct file *, const char *, unsigned int, ext4_fsblk_t, |
1891 | __attribute__ ((format (printf, 5, 6))); | 1891 | const char *, ...); |
1892 | extern void __ext4_std_error(struct super_block *, const char *, | 1892 | extern void __ext4_std_error(struct super_block *, const char *, |
1893 | unsigned int, int); | 1893 | unsigned int, int); |
1894 | extern void __ext4_abort(struct super_block *, const char *, unsigned int, | 1894 | extern __printf(4, 5) |
1895 | const char *, ...) | 1895 | void __ext4_abort(struct super_block *, const char *, unsigned int, |
1896 | __attribute__ ((format (printf, 4, 5))); | 1896 | const char *, ...); |
1897 | #define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \ | 1897 | #define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \ |
1898 | __LINE__, ## message) | 1898 | __LINE__, ## message) |
1899 | extern void __ext4_warning(struct super_block *, const char *, unsigned int, | 1899 | extern __printf(4, 5) |
1900 | const char *, ...) | 1900 | void __ext4_warning(struct super_block *, const char *, unsigned int, |
1901 | __attribute__ ((format (printf, 4, 5))); | 1901 | const char *, ...); |
1902 | #define ext4_warning(sb, message...) __ext4_warning(sb, __func__, \ | 1902 | #define ext4_warning(sb, message...) __ext4_warning(sb, __func__, \ |
1903 | __LINE__, ## message) | 1903 | __LINE__, ## message) |
1904 | extern void ext4_msg(struct super_block *, const char *, const char *, ...) | 1904 | extern __printf(3, 4) |
1905 | __attribute__ ((format (printf, 3, 4))); | 1905 | void ext4_msg(struct super_block *, const char *, const char *, ...); |
1906 | extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp, | 1906 | extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp, |
1907 | const char *, unsigned int, const char *); | 1907 | const char *, unsigned int, const char *); |
1908 | #define dump_mmp_msg(sb, mmp, msg) __dump_mmp_msg(sb, mmp, __func__, \ | 1908 | #define dump_mmp_msg(sb, mmp, msg) __dump_mmp_msg(sb, mmp, __func__, \ |
1909 | __LINE__, msg) | 1909 | __LINE__, msg) |
1910 | extern void __ext4_grp_locked_error(const char *, unsigned int, \ | 1910 | extern __printf(7, 8) |
1911 | struct super_block *, ext4_group_t, \ | 1911 | void __ext4_grp_locked_error(const char *, unsigned int, |
1912 | unsigned long, ext4_fsblk_t, \ | 1912 | struct super_block *, ext4_group_t, |
1913 | const char *, ...) | 1913 | unsigned long, ext4_fsblk_t, |
1914 | __attribute__ ((format (printf, 7, 8))); | 1914 | const char *, ...); |
1915 | #define ext4_grp_locked_error(sb, grp, message...) \ | 1915 | #define ext4_grp_locked_error(sb, grp, message...) \ |
1916 | __ext4_grp_locked_error(__func__, __LINE__, (sb), (grp), ## message) | 1916 | __ext4_grp_locked_error(__func__, __LINE__, (sb), (grp), ## message) |
1917 | extern void ext4_update_dynamic_rev(struct super_block *sb); | 1917 | extern void ext4_update_dynamic_rev(struct super_block *sb); |
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index a5d3853822e0..1510a4d51990 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h | |||
@@ -326,15 +326,14 @@ extern int fat_fill_super(struct super_block *sb, void *data, int silent, | |||
326 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | 326 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
327 | struct inode *i2); | 327 | struct inode *i2); |
328 | /* fat/misc.c */ | 328 | /* fat/misc.c */ |
329 | extern void | 329 | extern __printf(3, 4) __cold |
330 | __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...) | 330 | void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...); |
331 | __attribute__ ((format (printf, 3, 4))) __cold; | ||
332 | #define fat_fs_error(sb, fmt, args...) \ | 331 | #define fat_fs_error(sb, fmt, args...) \ |
333 | __fat_fs_error(sb, 1, fmt , ## args) | 332 | __fat_fs_error(sb, 1, fmt , ## args) |
334 | #define fat_fs_error_ratelimit(sb, fmt, args...) \ | 333 | #define fat_fs_error_ratelimit(sb, fmt, args...) \ |
335 | __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args) | 334 | __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args) |
336 | void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...) | 335 | __printf(3, 4) __cold |
337 | __attribute__ ((format (printf, 3, 4))) __cold; | 336 | void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...); |
338 | extern int fat_clusters_flush(struct super_block *sb); | 337 | extern int fat_clusters_flush(struct super_block *sb); |
339 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | 338 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); |
340 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, | 339 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, |
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 66707118af25..2553b858a72e 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h | |||
@@ -201,7 +201,7 @@ int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs); | |||
201 | void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs); | 201 | void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs); |
202 | void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs); | 202 | void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs); |
203 | 203 | ||
204 | __attribute__ ((format(printf, 2, 3))) | 204 | __printf(2, 3) |
205 | void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...); | 205 | void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...); |
206 | 206 | ||
207 | /** | 207 | /** |
diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 331b5e234ef3..de946170ebb1 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h | |||
@@ -311,8 +311,8 @@ static inline struct hpfs_sb_info *hpfs_sb(struct super_block *sb) | |||
311 | 311 | ||
312 | /* super.c */ | 312 | /* super.c */ |
313 | 313 | ||
314 | void hpfs_error(struct super_block *, const char *, ...) | 314 | __printf(2, 3) |
315 | __attribute__((format (printf, 2, 3))); | 315 | void hpfs_error(struct super_block *, const char *, ...); |
316 | int hpfs_stop_cycles(struct super_block *, int, int *, int *, char *); | 316 | int hpfs_stop_cycles(struct super_block *, int, int *, int *, char *); |
317 | unsigned hpfs_count_one_bitmap(struct super_block *, secno); | 317 | unsigned hpfs_count_one_bitmap(struct super_block *, secno); |
318 | 318 | ||
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index 255d5e1c03b7..3777d138f895 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
@@ -276,10 +276,10 @@ int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | |||
276 | /* super.c */ | 276 | /* super.c */ |
277 | extern struct inode *nilfs_alloc_inode(struct super_block *); | 277 | extern struct inode *nilfs_alloc_inode(struct super_block *); |
278 | extern void nilfs_destroy_inode(struct inode *); | 278 | extern void nilfs_destroy_inode(struct inode *); |
279 | extern void nilfs_error(struct super_block *, const char *, const char *, ...) | 279 | extern __printf(3, 4) |
280 | __attribute__ ((format (printf, 3, 4))); | 280 | void nilfs_error(struct super_block *, const char *, const char *, ...); |
281 | extern void nilfs_warning(struct super_block *, const char *, const char *, ...) | 281 | extern __printf(3, 4) |
282 | __attribute__ ((format (printf, 3, 4))); | 282 | void nilfs_warning(struct super_block *, const char *, const char *, ...); |
283 | extern struct nilfs_super_block * | 283 | extern struct nilfs_super_block * |
284 | nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **); | 284 | nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **); |
285 | extern int nilfs_store_magic_and_option(struct super_block *, | 285 | extern int nilfs_store_magic_and_option(struct super_block *, |
diff --git a/fs/ntfs/debug.h b/fs/ntfs/debug.h index 2142b1c68b61..53c27eaf2307 100644 --- a/fs/ntfs/debug.h +++ b/fs/ntfs/debug.h | |||
@@ -30,8 +30,9 @@ | |||
30 | 30 | ||
31 | extern int debug_msgs; | 31 | extern int debug_msgs; |
32 | 32 | ||
33 | extern void __ntfs_debug(const char *file, int line, const char *function, | 33 | extern __printf(4, 5) |
34 | const char *format, ...) __attribute__ ((format (printf, 4, 5))); | 34 | void __ntfs_debug(const char *file, int line, const char *function, |
35 | const char *format, ...); | ||
35 | /** | 36 | /** |
36 | * ntfs_debug - write a debug level message to syslog | 37 | * ntfs_debug - write a debug level message to syslog |
37 | * @f: a printf format string containing the message | 38 | * @f: a printf format string containing the message |
@@ -52,12 +53,14 @@ extern void ntfs_debug_dump_runlist(const runlist_element *rl); | |||
52 | 53 | ||
53 | #endif /* !DEBUG */ | 54 | #endif /* !DEBUG */ |
54 | 55 | ||
55 | extern void __ntfs_warning(const char *function, const struct super_block *sb, | 56 | extern __printf(3, 4) |
56 | const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); | 57 | void __ntfs_warning(const char *function, const struct super_block *sb, |
58 | const char *fmt, ...); | ||
57 | #define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a) | 59 | #define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a) |
58 | 60 | ||
59 | extern void __ntfs_error(const char *function, const struct super_block *sb, | 61 | extern __printf(3, 4) |
60 | const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); | 62 | void __ntfs_error(const char *function, const struct super_block *sb, |
63 | const char *fmt, ...); | ||
61 | #define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a) | 64 | #define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a) |
62 | 65 | ||
63 | #endif /* _LINUX_NTFS_DEBUG_H */ | 66 | #endif /* _LINUX_NTFS_DEBUG_H */ |
diff --git a/fs/ocfs2/super.h b/fs/ocfs2/super.h index 40c7de084c10..74ff74cf78fe 100644 --- a/fs/ocfs2/super.h +++ b/fs/ocfs2/super.h | |||
@@ -31,17 +31,15 @@ extern struct workqueue_struct *ocfs2_wq; | |||
31 | int ocfs2_publish_get_mount_state(struct ocfs2_super *osb, | 31 | int ocfs2_publish_get_mount_state(struct ocfs2_super *osb, |
32 | int node_num); | 32 | int node_num); |
33 | 33 | ||
34 | void __ocfs2_error(struct super_block *sb, | 34 | __printf(3, 4) |
35 | const char *function, | 35 | void __ocfs2_error(struct super_block *sb, const char *function, |
36 | const char *fmt, ...) | 36 | const char *fmt, ...); |
37 | __attribute__ ((format (printf, 3, 4))); | ||
38 | 37 | ||
39 | #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args) | 38 | #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args) |
40 | 39 | ||
41 | void __ocfs2_abort(struct super_block *sb, | 40 | __printf(3, 4) |
42 | const char *function, | 41 | void __ocfs2_abort(struct super_block *sb, const char *function, |
43 | const char *fmt, ...) | 42 | const char *fmt, ...); |
44 | __attribute__ ((format (printf, 3, 4))); | ||
45 | 43 | ||
46 | #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args) | 44 | #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args) |
47 | 45 | ||
diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c index af9fdf046769..bd8ae788f689 100644 --- a/fs/partitions/ldm.c +++ b/fs/partitions/ldm.c | |||
@@ -49,18 +49,20 @@ | |||
49 | #define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a) | 49 | #define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a) |
50 | #define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a) | 50 | #define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a) |
51 | 51 | ||
52 | __attribute__ ((format (printf, 3, 4))) | 52 | static __printf(3, 4) |
53 | static void _ldm_printk (const char *level, const char *function, | 53 | void _ldm_printk(const char *level, const char *function, const char *fmt, ...) |
54 | const char *fmt, ...) | ||
55 | { | 54 | { |
56 | static char buf[128]; | 55 | struct va_format vaf; |
57 | va_list args; | 56 | va_list args; |
58 | 57 | ||
59 | va_start (args, fmt); | 58 | va_start (args, fmt); |
60 | vsnprintf (buf, sizeof (buf), fmt, args); | ||
61 | va_end (args); | ||
62 | 59 | ||
63 | printk ("%s%s(): %s\n", level, function, buf); | 60 | vaf.fmt = fmt; |
61 | vaf.va = &args; | ||
62 | |||
63 | printk("%s%s(): %pV\n", level, function, &vaf); | ||
64 | |||
65 | va_end(args); | ||
64 | } | 66 | } |
65 | 67 | ||
66 | /** | 68 | /** |
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index dbd52d4b5eed..dc8a8dcc5ae1 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h | |||
@@ -112,8 +112,8 @@ struct extent_position { | |||
112 | 112 | ||
113 | /* super.c */ | 113 | /* super.c */ |
114 | 114 | ||
115 | __attribute__((format(printf, 3, 4))) | 115 | extern __printf(3, 4) void udf_warning(struct super_block *, const char *, |
116 | extern void udf_warning(struct super_block *, const char *, const char *, ...); | 116 | const char *, ...); |
117 | static inline void udf_updated_lvid(struct super_block *sb) | 117 | static inline void udf_updated_lvid(struct super_block *sb) |
118 | { | 118 | { |
119 | struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh; | 119 | struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh; |
diff --git a/fs/ufs/ufs.h b/fs/ufs/ufs.h index 5be2755dd715..c26f2bcec264 100644 --- a/fs/ufs/ufs.h +++ b/fs/ufs/ufs.h | |||
@@ -117,9 +117,12 @@ extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buf | |||
117 | extern const struct file_operations ufs_dir_operations; | 117 | extern const struct file_operations ufs_dir_operations; |
118 | 118 | ||
119 | /* super.c */ | 119 | /* super.c */ |
120 | extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 120 | extern __printf(3, 4) |
121 | extern void ufs_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 121 | void ufs_warning(struct super_block *, const char *, const char *, ...); |
122 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 122 | extern __printf(3, 4) |
123 | void ufs_error(struct super_block *, const char *, const char *, ...); | ||
124 | extern __printf(3, 4) | ||
125 | void ufs_panic(struct super_block *, const char *, const char *, ...); | ||
123 | 126 | ||
124 | /* symlink.c */ | 127 | /* symlink.c */ |
125 | extern const struct inode_operations ufs_fast_symlink_inode_operations; | 128 | extern const struct inode_operations ufs_fast_symlink_inode_operations; |
diff --git a/fs/xfs/xfs_message.h b/fs/xfs/xfs_message.h index 7fb7ea007672..56dc0c17f16a 100644 --- a/fs/xfs/xfs_message.h +++ b/fs/xfs/xfs_message.h | |||
@@ -3,31 +3,29 @@ | |||
3 | 3 | ||
4 | struct xfs_mount; | 4 | struct xfs_mount; |
5 | 5 | ||
6 | extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...) | 6 | extern __printf(2, 3) |
7 | __attribute__ ((format (printf, 2, 3))); | 7 | void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...); |
8 | extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...) | 8 | extern __printf(2, 3) |
9 | __attribute__ ((format (printf, 2, 3))); | 9 | void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...); |
10 | extern void xfs_alert_tag(const struct xfs_mount *mp, int tag, | 10 | extern __printf(3, 4) |
11 | const char *fmt, ...) | 11 | void xfs_alert_tag(const struct xfs_mount *mp, int tag, const char *fmt, ...); |
12 | __attribute__ ((format (printf, 3, 4))); | 12 | extern __printf(2, 3) |
13 | extern void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...) | 13 | void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...); |
14 | __attribute__ ((format (printf, 2, 3))); | 14 | extern __printf(2, 3) |
15 | extern void xfs_err(const struct xfs_mount *mp, const char *fmt, ...) | 15 | void xfs_err(const struct xfs_mount *mp, const char *fmt, ...); |
16 | __attribute__ ((format (printf, 2, 3))); | 16 | extern __printf(2, 3) |
17 | extern void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...) | 17 | void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...); |
18 | __attribute__ ((format (printf, 2, 3))); | 18 | extern __printf(2, 3) |
19 | extern void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...) | 19 | void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...); |
20 | __attribute__ ((format (printf, 2, 3))); | 20 | extern __printf(2, 3) |
21 | extern void xfs_info(const struct xfs_mount *mp, const char *fmt, ...) | 21 | void xfs_info(const struct xfs_mount *mp, const char *fmt, ...); |
22 | __attribute__ ((format (printf, 2, 3))); | ||
23 | 22 | ||
24 | #ifdef DEBUG | 23 | #ifdef DEBUG |
25 | extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) | 24 | extern __printf(2, 3) |
26 | __attribute__ ((format (printf, 2, 3))); | 25 | void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...); |
27 | #else | 26 | #else |
28 | static inline void | 27 | static inline __printf(2, 3) |
29 | __attribute__ ((format (printf, 2, 3))) | 28 | void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) |
30 | xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) | ||
31 | { | 29 | { |
32 | } | 30 | } |
33 | #endif | 31 | #endif |