From: Johannes Berg <johannes@sipsolutions.net>
To: greearb@candelatech.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Add iface name when calling WARN-ON.
Date: Sat, 10 Mar 2012 09:02:23 +0100 [thread overview]
Message-ID: <1331366543.3348.1.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1331318216-27235-1-git-send-email-greearb@candelatech.com> (sfid-20120310_015306_799372_9A7E4047)
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
next prev parent reply other threads:[~2012-03-10 8:02 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 [this message]
2012-03-10 17:16 ` Ben Greear
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=1331366543.3348.1.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox