On Wed, 2012-02-29 at 10:31 +0200, Kalle Valo wrote: > Luciano Coelho <coelho@xxxxxx> writes: > > >> @@ -973,8 +974,14 @@ void wl12xx_tx_reset(struct wl1271 *wl, bool reset_tx_queues) > >> struct sk_buff *skb; > >> struct ieee80211_tx_info *info; > >> > >> - for (i = 0; i < NUM_TX_QUEUES; i++) > >> - wl->tx_queue_count[i] = 0; > >> + /* only reset the queues if something bad happened */ > >> + if (WARN_ON(wl1271_tx_total_queue_count(wl) != 0)) { > > > > Let's make all these WARN_ONs as WARN_ON_ONCE as it is recommended > > nowadays. This will make Kalle Valo happier. :) > > Hehe. Actually the dislike against WARN_ON() was started by John, I > again started the war to killing BUG_ON() :) Right, John's email was where I got the "recommended" from. ;) > But nevertheless, this changes makes also me happy. I have seen cases > where the whole system reboots because of WARN_ON() spam, so > WARN_ON_ONCE() is much better in in cases where's a possibility that it > will get printed a lot. Of course printk_ratelimit() is another option, > but for some reason it isn't that popular. Yeah, I totally agree. Especially when we have a loop, WARN_ON_ONCE should be sufficient, in my opinion. -- Cheers, Luca. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html