Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp870549imc; Sat, 16 Mar 2019 19:36:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUJStTpN26lJ8Wboc3u5Rd7tL1Q6vNkNrDWMD6WZw0kU8/BbFR7u7Jg18OTgELeOwZRYGN X-Received: by 2002:a65:62d4:: with SMTP id m20mr11192060pgv.416.1552790203733; Sat, 16 Mar 2019 19:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552790203; cv=none; d=google.com; s=arc-20160816; b=HuQcxGu8zkfHH2r374skdBgSAPAf1dD1rTXaPExJo4Ibcls1/O+F2cHgeKfsWfZLNY 3wOAYiarsOgRnHrmS8GWxQy+hxtxhq+XijIr0+Z7QvGcrdIUIJhmgLH20Hcu5LhnZSFu kjch89C3CKdkHmS4dJhSvqcJwsmgSqm4REzh3OgF06iXShoO0NohJibi1y7f6XXWGfF/ M3PSq2KjA7ICsnuszIdC0EOEvg3bnnuI0GG7GkEMMg+eNgnZV8FTcuyr3TowXsqFS6k7 IvmUqixm5ugsTdBKgtYh3g5ao4Kp+Ssz0apbta5J6PhFYfR2RMvVtQcM/8Y4waRKPeQT XjPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=BVT1LleI9pYQfZ1bdDjM0clFuEOHrUZYy7AWi1Gqi9E=; b=s++NwKKYArU8qpkTwlwlftUHz8DFRN6tHEMll2qaqpJilwUWI0lTfCoH/0q/XmegvO XPACcb8kg2DfB16o03YAiSnjQF2PJkNjf46ShirWAeGspBLH/YJ5Ysq34Sl/csk3TSMr IszfDSG8MymdqCWcEUxIEs71LCPMgQjWKRjpfaiKIygwRS4IfEQtgmwNYaDy7+bzaNgz PSe2p36y0Mx3yTxl+ZDryR4uwsHLNFF8Xwr9fksy+zkzh3ZugKNlBNNedQvvYRz2QYEx 3JwymNTye5jjWPQe/C7yD6FO6SSFHg8v/vNwIlMVFrSu3EyUhzsm/e5Q4N9akCwPQD/+ q3RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qDf3+KQ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g74si830864pfd.221.2019.03.16.19.35.55; Sat, 16 Mar 2019 19:36:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qDf3+KQ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbfCQCeP (ORCPT + 99 others); Sat, 16 Mar 2019 22:34:15 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:54905 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbfCQCeP (ORCPT ); Sat, 16 Mar 2019 22:34:15 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-07.nifty.com with ESMTP id x2H2Wbvd003170; Sun, 17 Mar 2019 11:32:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x2H2Wbvd003170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1552789958; bh=BVT1LleI9pYQfZ1bdDjM0clFuEOHrUZYy7AWi1Gqi9E=; h=From:To:Cc:Subject:Date:From; b=qDf3+KQ2muF+v8sbh/OetE80s1sr8w76QJ8tVSO6BwLEtQTnXfvZd5FrDlLRokLNU b88ZG6zeUwPVs0CcNd0/EsmCL8zGriKA5loE/4mo7HAedzLRWaFIf8DwX255mkVjxF zeTxcNRelLixufYC+WUj4miRlTVZ8vQqW0XOvw5BHvrLceZrN4wKvTkRGunjqzlZia +1UKwNd5euy2las69iI80EKYxVfbTlqezGpjMRU2gIf02BxhaRkEjYE7HJPrRE2JS1 iBy0nC6tHAF4b2c3LKxdSB1aBTdUqGELo+rRYzZV5GK532auczky4VhVIMmYNs+yvQ kyfZioOTppJWA== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: Felix Fietkau , linux-wireless@vger.kernel.org Cc: Ben Hutchings , Kalle Valo , Masahiro Yamada , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Bianconi , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger Subject: [PATCH] mt76: Use the correct hweight8() function again Date: Sun, 17 Mar 2019 11:32:28 +0900 Message-Id: <1552789948-31564-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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