From: Rob Landley <rlandley@parallels.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
Patrick McHardy <kaber@trash.net>,
Andy Whitcroft <apw@canonical.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] Move an assert under DEBUG_KERNEL.
Date: Wed, 9 Mar 2011 15:37:13 -0600 [thread overview]
Message-ID: <4D77F309.2030101@parallels.com> (raw)
From: Rob Landley <rlandley@parallels.com>
Move an assert under DEBUG_KERNEL. (Minor cleanup, saves about 3k for me.)
Signed-off-by: Rob Landley <rlandley@parallels.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)
{
next reply other threads:[~2011-03-09 21:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 21:37 Rob Landley [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-01-06 8:13 [PATCH] Move an assert under DEBUG_KERNEL Rob Landley
2011-01-06 23:41 ` Andrew Morton
2011-01-07 9:44 ` Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D77F309.2030101@parallels.com \
--to=rlandley@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox