[PATCH] m68k/irq: don't use pr_crit in an header

Uwe Kleine-König
2011-12-17T20:09:52Z

Using pr_crit in an header results in funny messages. Consider

#define pr_fmt(fmt) "mydriver: " fmt
#include <linux/hardirq.h>

which makes the message from ack_bad_irq

mydriver: unexpected IRQ trap...

so better use plain printk with KERN_CRIT directly.

This fixes a build problem on m68k with aufs3 en passant because the
latter builds with

ccflags-y += -D'pr_fmt(fmt)=AUFS_NAME"\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'

without providing AUFS_NAME early enough for ack_bad_irq (which is the
problem of aufs).

Cc: Thorsten Glaser <tg@debian.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
arch/m68k/include/asm/hardirq.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h
index db30ed2..1f652e0 100644
--- a/arch/m68k/include/asm/hardirq.h
+++ b/arch/m68k/include/asm/hardirq.h
@@ -20,7 +20,7 @@

static inline void ack_bad_irq(unsigned int irq)
{
- pr_crit("unexpected IRQ trap at vector %02x\n", irq);
+ printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
}

/* entry.S is sensitive to the offsets of these fields */
--
1.7.7.3