* [PATCH 0/9] Lock warning cleanups [not found] <0/9> @ 2020-04-11 0:19 ` Jules Irenge 2020-04-11 0:19 ` [PATCH 2/9] mt76: remove unnecessary annotations Jules Irenge 0 siblings, 1 reply; 2+ messages in thread From: Jules Irenge @ 2020-04-11 0:19 UTC (permalink / raw) To: linux-kernel Cc: Matthias Brugger, boqun.feng, moderated list:ARM/Mediatek SoC support, moderated list:ARM/Mediatek SoC support This patch series adds missing annotations to various functions, that register warnings of context imbalance when built with Sparse tool. The adds fix the warnings, improve on readability of the code and give better insight or directive on what the functions are actually doing. Jules Irenge (9): dm snapshot: Add missing annotation for dm_exception_table_lock() and dm_exception_table_unlock() mt76: remove unnecessary annotations hostap: Add missing annotations for prism2_bss_list_proc_start() and prism2_bss_list_proc_stop mac80211: Add missing annotation for brcms_rfkill_set_hw_state() mac80211: Add missing annotation for brcms_down() scsi: libsas: Add missing annotation for sas_ata_qc_issue() scsi: bnx2fc: Add missing annotation for bnx2fc_abts_cleanup() power: wakeup: Add missing annotation for wakeup_sources_stats_seq_start() and wakeup_sources_stats_seq_stop() power: wakeup: Add missing annotation for wakeup_sources_read_lock() and wakeup_sources_read_unlock() drivers/base/power/wakeup.c | 4 ++++ drivers/md/dm-snap.c | 4 ++++ .../net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 ++ drivers/net/wireless/intersil/hostap/hostap_proc.c | 2 ++ drivers/net/wireless/mediatek/mt76/tx.c | 4 +--- drivers/scsi/bnx2fc/bnx2fc_io.c | 1 + drivers/scsi/libsas/sas_ata.c | 1 + 7 files changed, 15 insertions(+), 3 deletions(-) -- 2.24.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/9] mt76: remove unnecessary annotations 2020-04-11 0:19 ` [PATCH 0/9] Lock warning cleanups Jules Irenge @ 2020-04-11 0:19 ` Jules Irenge 0 siblings, 0 replies; 2+ messages in thread From: Jules Irenge @ 2020-04-11 0:19 UTC (permalink / raw) To: linux-kernel Cc: Ryder Lee, open list:NETWORKING DRIVERS, boqun.feng, open list:MEDIATEK MT76 WIRELESS LAN DRIVER, Matthias Brugger, moderated list:ARM/Mediatek SoC support, moderated list:ARM/Mediatek SoC support, Roy Luo, Lorenzo Bianconi, David S. Miller, Kalle Valo, Felix Fietkau 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 <jbi.octave@gmail.com> --- drivers/net/wireless/mediatek/mt76/tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c index 7ee91d946882..7581ba9c2e95 100644 --- a/drivers/net/wireless/mediatek/mt76/tx.c +++ b/drivers/net/wireless/mediatek/mt76/tx.c @@ -101,18 +101,16 @@ 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 sk_buff *skb; spin_unlock_bh(&dev->status_list.lock); - __release(&dev->status_list.unlock); while ((skb = __skb_dequeue(list)) != NULL) ieee80211_tx_status(dev->hw, skb); -- 2.24.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-11 0:20 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <0/9> 2020-04-11 0:19 ` [PATCH 0/9] Lock warning cleanups Jules Irenge 2020-04-11 0:19 ` [PATCH 2/9] mt76: remove unnecessary annotations Jules Irenge
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).