* [PATCH] mt76: Use the correct hweight8() function again
@ 2019-03-17 2:32 Masahiro Yamada
2019-03-17 13:01 ` Felix Fietkau
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2019-03-17 2:32 UTC (permalink / raw)
To: Felix Fietkau, linux-wireless
Cc: Ben Hutchings, Kalle Valo, Masahiro Yamada, David S. Miller,
netdev, linux-kernel, Lorenzo Bianconi, linux-mediatek,
linux-arm-kernel, Matthias Brugger
Commit d0ff23c1107e ("mt76: Use the correct hweight8() function")
fixed the wrong use of __sw_hweight8().
Just a week later, commit c8846e101502 ("mt76: add driver for MT7603E
and MT7628/7688") was applid, introducing __sw_hweight8() again.
Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 3 +--
drivers/net/wireless/mediatek/mt76/mt7603/init.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index afcd86f..4dcb465 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -135,8 +135,7 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
out:
mt76_queue_tx_cleanup(dev, MT_TXQ_BEACON, false);
- if (dev->mt76.q_tx[MT_TXQ_BEACON].queued >
- __sw_hweight8(dev->beacon_mask))
+ if (dev->mt76.q_tx[MT_TXQ_BEACON].queued > hweight8(dev->beacon_mask))
dev->beacon_check++;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/init.c b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
index 15cc8f3..d54dda6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
@@ -112,7 +112,7 @@ static void
mt7603_phy_init(struct mt7603_dev *dev)
{
int rx_chains = dev->mt76.antenna_mask;
- int tx_chains = __sw_hweight8(rx_chains) - 1;
+ int tx_chains = hweight8(rx_chains) - 1;
mt76_rmw(dev, MT_WF_RMAC_RMCR,
(MT_WF_RMAC_RMCR_SMPS_MODE |
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
index 4b0713f..d06905e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
@@ -433,7 +433,7 @@ int mt7603_mcu_set_channel(struct mt7603_dev *dev)
{
struct cfg80211_chan_def *chandef = &dev->mt76.chandef;
struct ieee80211_hw *hw = mt76_hw(dev);
- int n_chains = __sw_hweight8(dev->mt76.antenna_mask);
+ int n_chains = hweight8(dev->mt76.antenna_mask);
struct {
u8 control_chan;
u8 center_chan;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mt76: Use the correct hweight8() function again
2019-03-17 2:32 [PATCH] mt76: Use the correct hweight8() function again Masahiro Yamada
@ 2019-03-17 13:01 ` Felix Fietkau
0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2019-03-17 13:01 UTC (permalink / raw)
To: Masahiro Yamada, linux-wireless
Cc: Ben Hutchings, Kalle Valo, David S. Miller, netdev, linux-kernel,
Lorenzo Bianconi, linux-mediatek, linux-arm-kernel,
Matthias Brugger
On 2019-03-17 03:32, Masahiro Yamada wrote:
> Commit d0ff23c1107e ("mt76: Use the correct hweight8() function")
> fixed the wrong use of __sw_hweight8().
>
> Just a week later, commit c8846e101502 ("mt76: add driver for MT7603E
> and MT7628/7688") was applid, introducing __sw_hweight8() again.
>
> Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
I've already sent the same patch to Kalle for 5.1 about a week ago.
- Felix
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-17 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 2:32 [PATCH] mt76: Use the correct hweight8() function again Masahiro Yamada
2019-03-17 13:01 ` Felix Fietkau
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).