[PATCH 2/5] RT: wrap BUILD_CHECK_IRQ_FLAGS

Kevin Hilman
2008-05-20T22:56:55Z

The macros used by BUILD_CHECK_IRQ_FLAGS() are defined in kernel.h,
but this file is sometimes included before kernel.h (or even by
kernel.h)

Signed-off-by: Kevin Hilman <khilman@mvista.com>
---
include/linux/irqflags.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 6ada2b9..e3bf9d0 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -11,11 +11,15 @@
#ifndef _LINUX_TRACE_IRQFLAGS_H
#define _LINUX_TRACE_IRQFLAGS_H

+#if defined(BUILD_CHECK_IRQ_FLAGS) && defined(typecheck)
#define BUILD_CHECK_IRQ_FLAGS(flags) \
do { \
BUILD_BUG_ON(sizeof(flags) != sizeof(unsigned long)); \
typecheck(unsigned long, flags); \
} while (0)
+#else
+#define BUILD_CHECK_IRQ_FLAGS(flags)
+#endif

#ifdef CONFIG_TRACE_IRQFLAGS
extern void trace_softirqs_on(unsigned long ip);
--
1.5.4.1.166.g6706d