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/fat | |
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/fat')
-rw-r--r-- | fs/fat/fat.h | 9 |
1 files changed, 4 insertions, 5 deletions
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, |