From: Johannes Berg Date: Fri, 4 Nov 2011 17:07:43 +0000 (+0100) Subject: mac80211: warn only once about not finding a rate X-Git-Tag: upstream/snapshot3+hdmi~8468^2^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54d5026e7c173edae8a27c293c286f1783d21ae8;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mac80211: warn only once about not finding a rate The warning really shouldn't happen, but until we find the reason why it does don't spew it all the time, just once is enough to know we've hit it. Reported-by: Linus Torvalds Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/include/net/mac80211.h b/include/net/mac80211.h index dc1123a..72eddd1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -3567,8 +3567,9 @@ rate_lowest_index(struct ieee80211_supported_band *sband, return i; /* warn when we cannot find a rate. */ - WARN_ON(1); + WARN_ON_ONCE(1); + /* and return 0 (the lowest index) */ return 0; }