xfs: kill off xfs_printk()
authorJoe Perches <joe@perches.com>
Tue, 3 May 2011 20:14:44 +0000 (20:14 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 19 May 2011 16:38:09 +0000 (11:38 -0500)
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>
fs/xfs/linux-2.6/xfs_message.c
fs/xfs/linux-2.6/xfs_message.h

index 9f76cce..bd672de 100644 (file)
@@ -41,23 +41,6 @@ __xfs_printk(
        printk("%sXFS: %pV\n", level, vaf);
 }
 
-void xfs_printk(
-       const char              *level,
-       const struct xfs_mount  *mp,
-       const char              *fmt, ...)
-{
-       struct va_format        vaf;
-       va_list                 args;
-
-       va_start(args, fmt);
-
-       vaf.fmt = fmt;
-       vaf.va = &args;
-
-       __xfs_printk(level, mp, &vaf);
-       va_end(args);
-}
-
 #define define_xfs_printk_level(func, kern_level)              \
 void func(const struct xfs_mount *mp, const char *fmt, ...)    \
 {                                                              \
@@ -95,8 +78,7 @@ xfs_alert_tag(
        int                     do_panic = 0;
 
        if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) {
-               xfs_printk(KERN_ALERT, mp,
-                       "XFS: Transforming an alert into a BUG.");
+               xfs_alert(mp, "Transforming an alert into a BUG.");
                do_panic = 1;
        }
 
index f1b3fc1..7fb7ea0 100644 (file)
@@ -3,9 +3,6 @@
 
 struct xfs_mount;
 
-extern void xfs_printk(const char *level, const struct xfs_mount *mp,
-                      const char *fmt, ...)
-        __attribute__ ((format (printf, 3, 4)));
 extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
 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, ...)
 extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
 #else
-static inline void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
+static inline void
+__attribute__ ((format (printf, 2, 3)))
+xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
 {
 }
 #endif