From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Add iface name when calling WARN-ON.
Date: Sat, 10 Mar 2012 09:16:22 -0800 [thread overview]
Message-ID: <4F5B8C66.4060808@candelatech.com> (raw)
In-Reply-To: <1331366543.3348.1.camel@jlt3.sipsolutions.net>
On 03/10/2012 12:02 AM, Johannes Berg wrote:
> On Fri, 2012-03-09 at 10:36 -0800, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> This lets the user know which interface has failed
>> the check_sdata_in_driver check.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>> :100644 100644 e8960ae... e62e7c3... M net/mac80211/driver-ops.h
>> net/mac80211/driver-ops.h | 6 +++++-
>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
>> index e8960ae..e62e7c3 100644
>> --- a/net/mac80211/driver-ops.h
>> +++ b/net/mac80211/driver-ops.h
>> @@ -7,7 +7,11 @@
>>
>> static inline void check_sdata_in_driver(struct ieee80211_sub_if_data *sdata)
>> {
>> - WARN_ON(!(sdata->flags& IEEE80211_SDATA_IN_DRIVER));
>> + if (unlikely(!(sdata->flags& IEEE80211_SDATA_IN_DRIVER))) {
>> + printk(KERN_ERR "%s: Failed check-sdata-in-driver check, flags: 0x%x\n",
>> + sdata->dev->name, sdata->flags);
>> + WARN_ON(1);
>> + }
>
> How about WARN(!(...), ...) instead -- that way the message will be part
> of the warning too.
>
> johannes
Sure. Also, should I maybe un-inline this thing since it is now a bit
bigger code wise?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2012-03-10 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 18:36 [PATCH] mac80211: Add iface name when calling WARN-ON greearb
2012-03-10 8:02 ` Johannes Berg
2012-03-10 17:16 ` Ben Greear [this message]
2012-03-10 18:01 ` Joe Perches
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=4F5B8C66.4060808@candelatech.com \
--to=greearb@candelatech.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.