Skip to contentSkip to conversation

wifi: rtw89: fw: remove unnecessary rcu_read_unlock() for punctured

PATCH In review Ping-Ke Shih 2 participants 5 messages Feb 13, 2024 – Feb 15, 2024 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw89: fw: remove unnecessary rcu_read_unlock() for punctured

The rcu_read_unlock() is accidentally added, and sparse warn:

drivers/net/wireless/realtek/rtw89/fw.c:2807:17:
warning: context imbalance in 'rtw89_fw_h2c_assoc_cmac_tbl_g7' - unexpected unlock

Fixes b82730bf57b5 ("wifi: cfg80211/mac80211: move puncturing into chandef")
Cc Johannes Berg <[email protected]>
---
 drivers/net/wireless/realtek/rtw89/fw.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/wireless/realtek/rtw89/fw.c +0 -1
index 540ea16f048e..7f0c8cfb3e2d 100644
@@ -2808,7 +2808,6 @@ int rtw89_fw_h2c_assoc_cmac_tbl_g7(struct rtw89_dev *rtwdev,
 
 		h2c->w4 |= le32_encode_bits(~punct,
 					    CCTLINFO_G7_W4_ACT_SUBCH_CBW);
-		rcu_read_unlock();
 		h2c->m4 |= cpu_to_le32(CCTLINFO_G7_W4_ACT_SUBCH_CBW);
 	}
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Ping-Ke Shih

The rcu_read_unlock() is accidentally added, and sparse warn:

drivers/net/wireless/realtek/rtw89/fw.c:2807:17:
warning: context imbalance in 'rtw89_fw_h2c_assoc_cmac_tbl_g7' - unexpected unlock

Fixes b82730bf57b5 ("wifi: cfg80211/mac80211: move puncturing into chandef")
Cc Johannes Berg <[email protected]>

Commit b82730bf57b5 is in wireless-next so I'll queue this patch to wireless-next as well, right?

This again shows how important it is to fix all the remainging sparse warnings in wireless code so that we don't miss important warnings like this. If there just would be a way to get the cleanup patch submitters to fix the sparse warnings, sigh.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author maintainer
#2 lore raw
Quoted 8 lines · Kalle Valo
Quoted 5 lines · Ping-Ke Shih

The rcu_read_unlock() is accidentally added, and sparse warn:

drivers/net/wireless/realtek/rtw89/fw.c:2807:17:
warning: context imbalance in 'rtw89_fw_h2c_assoc_cmac_tbl_g7' - unexpected unlock

Quoted 6 lines
Quoted 3 lines
Fixes b82730bf57b5 ("wifi: cfg80211/mac80211: move puncturing into chandef")
Cc Johannes Berg <[email protected]>

Commit b82730bf57b5 is in wireless-next so I'll queue this patch to wireless-next as well, right?

I think yes.

Quoted 6 lines

This again shows how important it is to fix all the remainging sparse warnings in wireless code so that we don't miss important warnings like this. If there just would be a way to get the cleanup patch submitters to fix the sparse warnings, sigh.

In short term, can we record the count of warnings and ensure it doesn't increase while new commits are getting merged?

Ping-Ke

#3 lore raw
Quoted 7 lines · Ping-Ke Shih
Quoted 4 lines

This again shows how important it is to fix all the remainging sparse warnings in wireless code so that we don't miss important warnings like this. If there just would be a way to get the cleanup patch submitters to fix the sparse warnings, sigh.

In short term, can we record the count of warnings and ensure it doesn't increase while new commits are getting merged?

Netdev has that kind of checks in checkpatch:

netdev/build_allmodconfig_warn success Errors and warnings before: 993 this patch: 992

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

But in wireless project we have not set up that. That reminds me that I need to reply to Jakub's email related to this.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#4 lore raw
In reply to Ping-Ke Shih
Quoted 8 lines · Ping-Ke Shih

The rcu_read_unlock() is accidentally added, and sparse warn:

drivers/net/wireless/realtek/rtw89/fw.c:2807:17:
warning: context imbalance in 'rtw89_fw_h2c_assoc_cmac_tbl_g7' - unexpected unlock

Fixes b82730bf57b5 ("wifi: cfg80211/mac80211: move puncturing into chandef")
Cc Johannes Berg <[email protected]>

Patch applied to wireless-next.git, thanks.

63d94f749623 wifi: rtw89: fw: remove unnecessary rcu_read_unlock() for punctured

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches