[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150312073230.GA32014@opentech.at>
Date: Thu, 12 Mar 2015 08:32:30 +0100
From: Nicholas Mc Guire <der.herr@...r.at>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Nicholas Mc Guire <hofrat@...dl.org>,
Kalle Valo <kvalo@....qualcomm.com>, Valdis.Kletnieks@...edu,
Bj??rn Mork <bjorn@...k.no>,
Jeff Haran <Jeff.Haran@...rix.com>,
Pat Erley <pat-lkml@...ey.org>, ath10k@...ts.infradead.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2] ath10k: move code from parameter list into a
function
On Wed, 11 Mar 2015, Sergei Shtylyov wrote:
> Hello.
>
> On 03/11/2015 10:01 PM, Nicholas Mc Guire wrote:
>
>> Putting code into the parameter list of wait_event_timeout() might be
>> legal C-code but not really readable - the "inline" code is simply
>> moved into a function and that passed to wait_event_timeout() as the
>> condition. As wait_event_timeout will always return >= 0 the following
>> timeout check is fixed up to ret == 0 .
>
>> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> [...]
>
>> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
>> index e8cc19f..a7a12cc 100644
>> --- a/drivers/net/wireless/ath/ath10k/mac.c
>> +++ b/drivers/net/wireless/ath/ath10k/mac.c
>> @@ -4463,11 +4463,25 @@ static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
>> return ret;
>> }
>>
>> +static bool check_htt_state(struct ath10k *ar, bool *skip)
>> +{
>> + bool empty;
>> +
>> + spin_lock_bh(&ar->htt.tx_lock);
>> + empty = (ar->htt.num_pending_tx == 0);
>> + spin_unlock_bh(&ar->htt.tx_lock);
>> +
>> + *skip = (ar->state == ATH10K_STATE_WEDGED) ||
>> + test_bit(ATH10K_FLAG_CRASH_FLUSH,
>> + &ar->dev_flags);
>> + return (empty || *skip);
>
> Parens not needed here.
>
Thanks - will see what else I forgot and then repost a cleaned up
version.
thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists