Skip to content

Commit

Permalink
mt76: remove unnecessary annotations
Browse files Browse the repository at this point in the history
Sparse report warnings at mt76_tx_status_unlock() and mt76_tx_status_lock()

warning: context imbalance in mt76_tx_status_lock() - wrong count at exit
warning: context imbalance in mt76_tx_status_unlock() - unexpected unlock

The root cause is the additional __acquire(&dev->status_list.lock)
and __release(&dev->status_list.unlock) called
 from inside mt76_tx_status_lock() and mt76_tx_status_unlock().

Remove __acquire(&dev->status_list.lock) annotation
Remove __releases(&dev->status_list.unlock)
Correct &dev->status_list.unlock to &dev->status_list.lock
	-unlock not defined in the sk_buff_head struct

Signed-off-by: Jules Irenge <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
irenge authored and nbd168 committed May 12, 2020
1 parent 9fbb4b8 commit 5da6120
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wireless/mediatek/mt76/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,17 @@ mt76_tx_status_lock(struct mt76_dev *dev, struct sk_buff_head *list)
{
__skb_queue_head_init(list);
spin_lock_bh(&dev->status_list.lock);
__acquire(&dev->status_list.lock);
}
EXPORT_SYMBOL_GPL(mt76_tx_status_lock);

void
mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
__releases(&dev->status_list.unlock)
__releases(&dev->status_list.lock)
{
struct ieee80211_hw *hw;
struct sk_buff *skb;

spin_unlock_bh(&dev->status_list.lock);
__release(&dev->status_list.unlock);

while ((skb = __skb_dequeue(list)) != NULL) {
hw = mt76_tx_status_get_hw(dev, skb);
Expand Down

0 comments on commit 5da6120

Please sign in to comment.