From patchwork Mon Feb 18 05:59:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10817357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC2861390 for ; Mon, 18 Feb 2019 06:07:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9235A29F8A for ; Mon, 18 Feb 2019 06:07:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FE872A0C8; Mon, 18 Feb 2019 06:07:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A3F729F8A for ; Mon, 18 Feb 2019 06:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725863AbfBRGHF (ORCPT ); Mon, 18 Feb 2019 01:07:05 -0500 Received: from condef-03.nifty.com ([202.248.20.68]:50335 "EHLO condef-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbfBRGHF (ORCPT ); Mon, 18 Feb 2019 01:07:05 -0500 Received: from conuserg-07.nifty.com ([10.126.8.70])by condef-03.nifty.com with ESMTP id x1I63Eca025123 for ; Mon, 18 Feb 2019 15:03:20 +0900 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x1I617hP006910; Mon, 18 Feb 2019 15:01:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x1I617hP006910 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1550469668; bh=NxLW51joWyvnJN1RnKNbaCQPsjav24QXUL7FZQbjRU0=; h=From:To:Cc:Subject:Date:From; b=R81ueSNdiAOMm8788ckrvP8r9ErabEmk5m+otXRzuz1n03mpjh4VN8EnOnqFC7lZb rwYgt2hpW+j1yBo026+MPCTjDyfNb/e494jiJc7GIIht5ePf/LYcpA5I1KybzYdyxK VltDqvGWePalbRuSiZhB0vcBdKmOHEFBhZU7eMXR9flrlaPLDY27IjagBAAWB8878u XZZiC1rp/F+4vo86Cq41tdoY5NXn3jVcnAQcODYcX6kaycLn7pnVXnFSVDXluwy8JA eaoIUGJpeNn2RhxYjWCkb2URNZXrhxjYUOmLW/U7r1zdfLRQpVftSaahLEfbyp9wxd z5AG2TANZMfCA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Ingo Molnar , Thomas Gleixner , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org Cc: Kalle Valo , linux-wireless@vger.kernel.org, Christoph Hellwig , 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, Felix Fietkau , Matthias Brugger Subject: [PATCH 0/2] x86: turn off wrongly enabled CONFIG_GENERIC_HWEIGHT Date: Mon, 18 Feb 2019 14:59:29 +0900 Message-Id: <1550469571-25933-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP x86 should not enable CONFIG_GENERIC_HWEIGHT because lib/hweight.c is not used by x86. The only user is drivers/net/wireless/mediatek/mt76/mac80211.c Of course, this driver is wrong since drivers should use the generic API, hweight8(). After fixing it, x86 does not need to compile lib/hweight.c at all. The real implementation is located in arch/x86/lib/hweight.S Masahiro Yamada (2): wireless: mt76: call hweight8() instead of __sw_hweight8() x86: disable CONFIG_GENERIC_HWEIGHT and remove __HAVE_ARCH_SW_HWEIGHT arch/x86/Kconfig | 3 --- arch/x86/include/asm/arch_hweight.h | 2 -- drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +- lib/hweight.c | 4 ---- 4 files changed, 1 insertion(+), 10 deletions(-)