diff options
author | Joe Perches <joe@perches.com> | 2011-05-03 16:14:44 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-05-19 12:38:09 -0400 |
commit | e69522a8cc51fbefbfe9d178ad177f7b6ca00ebd (patch) | |
tree | 153a8fd226f368164d6b1f21e31e590396c37c9f /fs | |
parent | e4d3c4a43b595d5124ae824d300626e6489ae857 (diff) |
xfs: kill off xfs_printk()
xfs_alert_tag() can be defined using xfs_alert(), and thereby avoid
using xfs_printk() altogether. This is the only remaining use of
xfs_printk(), so changing it this way means xfs_printk() can simply
be eliminated.can simply be eliminated.can simply be eliminated.can
simply be eliminated.can simply be eliminated.can simply be
eliminated.can simply be eliminated.can simply be eliminated.can
simply be eliminated.
Also add format checking to the non-debug inline function xfs_debug.
Miscellaneous function prototype argument alignment.
(Updated to delete the definition of xfs_printk(), which is
no longer used or needed.)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_message.c | 20 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_message.h | 7 |
2 files changed, 4 insertions, 23 deletions
diff --git a/fs/xfs/linux-2.6/xfs_message.c b/fs/xfs/linux-2.6/xfs_message.c index 9f76cceb678d..bd672def95ac 100644 --- a/fs/xfs/linux-2.6/xfs_message.c +++ b/fs/xfs/linux-2.6/xfs_message.c | |||
@@ -41,23 +41,6 @@ __xfs_printk( | |||
41 | printk("%sXFS: %pV\n", level, vaf); | 41 | printk("%sXFS: %pV\n", level, vaf); |
42 | } | 42 | } |
43 | 43 | ||
44 | void xfs_printk( | ||
45 | const char *level, | ||
46 | const struct xfs_mount *mp, | ||
47 | const char *fmt, ...) | ||
48 | { | ||
49 | struct va_format vaf; | ||
50 | va_list args; | ||
51 | |||
52 | va_start(args, fmt); | ||
53 | |||
54 | vaf.fmt = fmt; | ||
55 | vaf.va = &args; | ||
56 | |||
57 | __xfs_printk(level, mp, &vaf); | ||
58 | va_end(args); | ||
59 | } | ||
60 | |||
61 | #define define_xfs_printk_level(func, kern_level) \ | 44 | #define define_xfs_printk_level(func, kern_level) \ |
62 | void func(const struct xfs_mount *mp, const char *fmt, ...) \ | 45 | void func(const struct xfs_mount *mp, const char *fmt, ...) \ |
63 | { \ | 46 | { \ |
@@ -95,8 +78,7 @@ xfs_alert_tag( | |||
95 | int do_panic = 0; | 78 | int do_panic = 0; |
96 | 79 | ||
97 | if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) { | 80 | if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) { |
98 | xfs_printk(KERN_ALERT, mp, | 81 | xfs_alert(mp, "Transforming an alert into a BUG."); |
99 | "XFS: Transforming an alert into a BUG."); | ||
100 | do_panic = 1; | 82 | do_panic = 1; |
101 | } | 83 | } |
102 | 84 | ||
diff --git a/fs/xfs/linux-2.6/xfs_message.h b/fs/xfs/linux-2.6/xfs_message.h index f1b3fc1b6c4e..7fb7ea007672 100644 --- a/fs/xfs/linux-2.6/xfs_message.h +++ b/fs/xfs/linux-2.6/xfs_message.h | |||
@@ -3,9 +3,6 @@ | |||
3 | 3 | ||
4 | struct xfs_mount; | 4 | struct xfs_mount; |
5 | 5 | ||
6 | extern void xfs_printk(const char *level, const struct xfs_mount *mp, | ||
7 | const char *fmt, ...) | ||
8 | __attribute__ ((format (printf, 3, 4))); | ||
9 | extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...) | 6 | extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...) |
10 | __attribute__ ((format (printf, 2, 3))); | 7 | __attribute__ ((format (printf, 2, 3))); |
11 | extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...) | 8 | extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...) |
@@ -28,7 +25,9 @@ extern void xfs_info(const struct xfs_mount *mp, const char *fmt, ...) | |||
28 | extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) | 25 | extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) |
29 | __attribute__ ((format (printf, 2, 3))); | 26 | __attribute__ ((format (printf, 2, 3))); |
30 | #else | 27 | #else |
31 | static inline void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) | 28 | static inline void |
29 | __attribute__ ((format (printf, 2, 3))) | ||
30 | xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) | ||
32 | { | 31 | { |
33 | } | 32 | } |
34 | #endif | 33 | #endif |