lkml.org 
[lkml]   [2021]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: rtl8723bs: Use list iterators and helpers
From
Date
On 5/3/21 9:48 AM, Greg Kroah-Hartman wrote:
> On Wed, Apr 28, 2021 at 10:33:01AM -0700, Guenter Roeck wrote:
>> diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
>> index 85663182b388..9cb2c7a112d2 100644
>> --- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
>> +++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
>> @@ -124,11 +124,8 @@ void kfree_all_stainfo(struct sta_priv *pstapriv)
>> spin_lock_bh(&pstapriv->sta_hash_lock);
>>
>> phead = get_list_head(&pstapriv->free_sta_queue);
>> - plist = get_next(phead);
>> -
>> - while (phead != plist) {
>> - psta = container_of(plist, struct sta_info, list);
>> - plist = get_next(plist);
>> + list_for_each(plist, phead) {
>> + psta = list_entry(plist, struct sta_info, list);
>> }
>>
>> spin_unlock_bh(&pstapriv->sta_hash_lock);
>
>
> This chunk didn't apply to my tree as someone else cleaned something in
> this function.
>
> But that doesn't even really matter as this function does nothing at
> all!
>

You are correct. Weird.

Guenter

\
 
 \ /
  Last update: 2021-05-03 19:37    [W:2.173 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site