Linux wireless drivers development
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@adurom.com>
To: Luciano Coelho <coelho@ti.com>
Cc: Arik Nemtsov <arik@wizery.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/7] wl12xx: reset link Tx queues when freeing it
Date: Wed, 29 Feb 2012 10:31:10 +0200	[thread overview]
Message-ID: <87pqcyavn5.fsf@purkki.adurom.net> (raw)
In-Reply-To: <1330422678.18637.28.camel@cumari> (Luciano Coelho's message of "Tue, 28 Feb 2012 11:51:18 +0200")

Luciano Coelho <coelho@ti.com> 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() :)

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.

-- 
Kalle Valo

  parent reply	other threads:[~2012-02-29  8:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 22:41 [PATCH 1/7] wl12xx: set the ELP entry delay to the FW dyn-ps timeout Arik Nemtsov
2012-02-27 22:41 ` [PATCH 2/7] wl12xx: change bits in the link_map under spin lock Arik Nemtsov
2012-02-27 22:41 ` [PATCH 3/7] wl12xx: reset link Tx queues when freeing it Arik Nemtsov
2012-02-28  9:51   ` Luciano Coelho
2012-02-28 10:09     ` Arik Nemtsov
2012-02-29  8:31     ` Kalle Valo [this message]
2012-02-29  8:39       ` Luciano Coelho
2012-02-27 22:41 ` [PATCH 4/7] wl12xx: avoid starving the system hlid Arik Nemtsov
2012-02-27 22:41 ` [PATCH 5/7] wl12xx: flush all Tx queues on tx_flush timeout Arik Nemtsov
2012-02-27 22:41 ` [PATCH 6/7] wl12xx: flush Tx during suspend and 802.11h chan switch Arik Nemtsov
2012-02-27 22:41 ` [PATCH 7/7] wl12xx: increase dynamic PS timeout to 200ms Arik Nemtsov
2012-02-28 12:05 ` [PATCH 1/7] wl12xx: set the ELP entry delay to the FW dyn-ps timeout Luciano Coelho

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=87pqcyavn5.fsf@purkki.adurom.net \
    --to=kvalo@adurom.com \
    --cc=arik@wizery.com \
    --cc=coelho@ti.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