[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4D77F309.2030101@parallels.com>
Date: Wed, 9 Mar 2011 15:37:13 -0600
From: Rob Landley <rlandley@...allels.com>
To: LKML <linux-kernel@...r.kernel.org>
CC: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Patrick McHardy <kaber@...sh.net>,
Andy Whitcroft <apw@...onical.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] Move an assert under DEBUG_KERNEL.
From: Rob Landley <rlandley@...allels.com>
Move an assert under DEBUG_KERNEL. (Minor cleanup, saves about 3k for me.)
Signed-off-by: Rob Landley <rlandley@...allels.com>
---
Note: I looked for a better config symbol than DEBUG_KERNEL but there
isn't currently a relevant DEBUG_NET variant and this doesn't seem
big enough to add one. DEBUG_KERNEL is already used directly in
powerpc, parisc, and blackfin anyway.
include/linux/rtnetlink.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index bbad657..28c4025 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -782,6 +782,7 @@ extern struct netdev_queue *dev_ingress_queue_create(struct net_device *dev);
extern void rtnetlink_init(void);
extern void __rtnl_unlock(void);
+#ifdef CONFIG_DEBUG_KERNEL
#define ASSERT_RTNL() do { \
if (unlikely(!rtnl_is_locked())) { \
printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
@@ -789,6 +790,9 @@ extern void __rtnl_unlock(void);
dump_stack(); \
} \
} while(0)
+#else
+#define ASSERT_RTNL()
+#endif
static inline u32 rtm_get_table(struct rtattr **rta, u8 table)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists