From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: netdev <netdev@vger.kernel.org>, Jiri Benc <jbenc@suse.cz>,
Jouni Malinen <jkm@devicescape.com>
Subject: [PATCH] d80211: use BUILD_BUG_ON
Date: Wed, 30 Aug 2006 10:39:30 +0200 [thread overview]
Message-ID: <1156927170.4013.50.camel@ux156> (raw)
This patch makes d80211 use BUILD_BUG_ON instead of checking at module
initialisation time. This check really is only interesting while you
hack since if the module was built, then it's either an 'always true' or
'always false' comparison, hence useless to do it at runtime.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
--- wireless-dev.orig/net/d80211/ieee80211.c 2006-08-25 17:53:16.488836518 +0200
+++ wireless-dev/net/d80211/ieee80211.c 2006-08-25 18:01:59.148836518 +0200
@@ -4833,13 +4833,8 @@ static int __init ieee80211_init(void)
struct sk_buff *skb;
int ret;
- if (sizeof(struct ieee80211_tx_packet_data) > (sizeof(skb->cb))) {
- printk("80211: ieee80211_tx_packet_data is bigger "
- "than the skb->cb (%d > %d)\n",
- (int) sizeof(struct ieee80211_tx_packet_data),
- (int) sizeof(skb->cb));
- return -EINVAL;
- }
+ BUILD_BUG_ON(sizeof(struct ieee80211_tx_packet_data) > sizeof(skb->cb));
+
if ((ret = ieee80211_sysfs_init())) {
printk(KERN_WARNING "ieee80211_init: sysfs initialization "
"failed\n");
reply other threads:[~2006-08-30 8:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1156927170.4013.50.camel@ux156 \
--to=johannes@sipsolutions.net \
--cc=jbenc@suse.cz \
--cc=jkm@devicescape.com \
--cc=linville@tuxdriver.com \
--cc=netdev@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