From patchwork Sun Dec 1 18:17:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pablo_Sebasti=C3=A1n_Greco?= X-Patchwork-Id: 11268619 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 317C3138C for ; Sun, 1 Dec 2019 18:18:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E6B52071F for ; Sun, 1 Dec 2019 18:18:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dcyarXWe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E6B52071F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=centosproject.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=rJT+vHoJRvsvTebl//7T2xfMKcUYXdAbrXBS91Tj1so=; b=dcy arXWejI4A0GIYSsU4b3+4x9UwhwlAqTfZo7TdPpKs+i5+VniqRGmJTvJGLlVFy58PyR3Ueeu1Eojp 1SwDa4eBTKoWR2VzcenjaXh1xAnkEqaGTzUH0o4BsbczQJS3ad/XBTHv8AYgawJKHkn0nuM4+pb6b 2NA2vqyZE8TOLhUHFgeX595+LxQ2vq+4cMufS9a5baTfpnYEn598eltsn/ClZnX6R5ob6wgDPJGEa F9/nWBw3SS9IepUoBd89hKivjtT5riaMSjKv3y6P+1VbAVfMImooa7RNBLwTIQhim0932DiFG2VT7 nL96c4AYjaa//hp62WWUyvT315Vz6Xg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibTnC-0007ZP-8o; Sun, 01 Dec 2019 18:17:58 +0000 Received: from mail2.sp2max.com.br ([138.185.4.9]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibTn8-0007HA-Fj; Sun, 01 Dec 2019 18:17:56 +0000 Received: from pgsop.sopnet.com.ar (unknown [179.40.38.12]) (Authenticated sender: pablo@fliagreco.com.ar) by mail2.sp2max.com.br (Postfix) with ESMTPA id 5618C7B30BD; Sun, 1 Dec 2019 15:17:40 -0300 (-03) From: Pablo Greco To: Subject: [PATCH v1] mt76: mt7615: Fix build with older compilers Date: Sun, 1 Dec 2019 15:17:10 -0300 Message-Id: <20191201181716.61892-1-pgreco@centosproject.org> X-Mailer: git-send-email 2.18.1 X-SP2Max-MailScanner-Information: Please contact the ISP for more information X-SP2Max-MailScanner-ID: 5618C7B30BD.A1C61 X-SP2Max-MailScanner: Sem Virus encontrado X-SP2Max-MailScanner-SpamCheck: nao spam, SpamAssassin (not cached, escore=-2.9, requerido 6, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-SP2Max-MailScanner-From: pgreco@centosproject.org X-Spam-Status: No X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191201_101754_704824_4E500695 X-CRM114-Status: UNSURE ( 6.03 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryder Lee , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Pablo Greco , linux-kernel@vger.kernel.org, Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Roy Luo , Lorenzo Bianconi , "David S. Miller" , Kalle Valo , Felix Fietkau MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Some compilers (tested with 4.8.5 from CentOS 7) fail properly process FIELD_GET inside an inline function, which ends up in a BUILD_BUG_ON. Convert inline function to a macro. Fixes commit bf92e7685100 ("mt76: mt7615: add support for per-chain signal strength reporting") Reported in https://lkml.org/lkml/2019/9/21/146 Reported-by: kbuild test robot Signed-off-by: Pablo Greco --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index c77adc5d2552..77e395ca2c6a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -13,10 +13,7 @@ #include "../dma.h" #include "mac.h" -static inline s8 to_rssi(u32 field, u32 rxv) -{ - return (FIELD_GET(field, rxv) - 220) / 2; -} +#define to_rssi(field, rxv) ((FIELD_GET(field, rxv) - 220) / 2) static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev, u8 idx, bool unicast)