* [bug report] iwlwifi: mvm: kill INACTIVE queue state
@ 2018-10-17 7:55 Dan Carpenter
2018-10-17 8:00 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-10-17 7:55 UTC (permalink / raw)
To: johannes.berg; +Cc: linux-wireless
Hello Johannes Berg,
The patch 724fe7710ac5: "iwlwifi: mvm: kill INACTIVE queue state"
from Jul 4, 2018, leads to the following static checker warning:
drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1243 iwl_mvm_inactivity_check()
warn: 'iwl_mvm_remove_inactive_tids(mvm, mvmsta, i, inactive_tid_bitmap, &unshare_queues, &changetid_queues)' is unsigned
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
1223 /*
1224 * If the STA doesn't exist anymore, it isn't an error. It could
1225 * be that it was removed since getting the queues, and in this
1226 * case it should've inactivated its queues anyway.
1227 */
1228 if (IS_ERR_OR_NULL(sta))
1229 continue;
1230
1231 mvmsta = iwl_mvm_sta_from_mac80211(sta);
1232
1233 /* this isn't so nice, but works OK due to the way we loop */
1234 spin_unlock(&mvm->queue_info_lock);
1235
1236 /* and we need this locking order */
1237 spin_lock(&mvmsta->lock);
1238 spin_lock(&mvm->queue_info_lock);
1239 ret = iwl_mvm_remove_inactive_tids(mvm, mvmsta, i,
1240 inactive_tid_bitmap,
1241 &unshare_queues,
1242 &changetid_queues);
1243 if (ret >= 0 && free_queue < 0)
^^^^^^^^
The iwl_mvm_remove_inactive_tids() returns a bool so it doesn't make
sense to test for >= 0. Probably we should test for ret == true?
1244 free_queue = ret;
1245 /* only unlock sta lock - we still need the queue info lock */
1246 spin_unlock(&mvmsta->lock);
1247 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] iwlwifi: mvm: kill INACTIVE queue state
2018-10-17 7:55 [bug report] iwlwifi: mvm: kill INACTIVE queue state Dan Carpenter
@ 2018-10-17 8:00 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2018-10-17 8:00 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-wireless, sara.sharon
Hi Dan,
> 1239 ret = iwl_mvm_remove_inactive_tids(mvm, mvmsta, i,
> 1240 inactive_tid_bitmap,
> 1241 &unshare_queues,
> 1242 &changetid_queues);
> 1243 if (ret >= 0 && free_queue < 0)
> ^^^^^^^^
>
> The iwl_mvm_remove_inactive_tids() returns a bool so it doesn't make
> sense to test for >= 0. Probably we should test for ret == true?
Huh, thanks for the report, we'll check.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-17 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 7:55 [bug report] iwlwifi: mvm: kill INACTIVE queue state Dan Carpenter
2018-10-17 8:00 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).