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/ufs | |
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/ufs')
-rw-r--r-- | fs/ufs/ufs.h | 9 |
1 files changed, 6 insertions, 3 deletions
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; |