aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/debug.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-10-31 20:11:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-31 20:30:54 -0400
commitb9075fa968a0a4347aef35e235e2995c0e57dddd (patch)
treecf9f9716784e790d8a43339653256d9cf9178ff3 /fs/ntfs/debug.h
parentae29bc92da01a2e9d278a9a58c3b307d41cc0254 (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/ntfs/debug.h')
-rw-r--r--fs/ntfs/debug.h15
1 files changed, 9 insertions, 6 deletions
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
31extern int debug_msgs; 31extern int debug_msgs;
32 32
33extern void __ntfs_debug(const char *file, int line, const char *function, 33extern __printf(4, 5)
34 const char *format, ...) __attribute__ ((format (printf, 4, 5))); 34void __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
55extern void __ntfs_warning(const char *function, const struct super_block *sb, 56extern __printf(3, 4)
56 const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); 57void __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
59extern void __ntfs_error(const char *function, const struct super_block *sb, 61extern __printf(3, 4)
60 const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); 62void __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 */