From: Pablo Greco Date: Sun, 1 Dec 2019 18:17:10 +0000 (-0300) Subject: mt76: mt7615: Fix build with older compilers X-Git-Tag: baikal/aarch64/sdk6.1~9689^2~240^2^2~100 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=3a37b580abd94ea5a84c7502c5f07f83e74799d0;p=kernel.git mt76: mt7615: Fix build with older compilers 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 c45085ce7cf8 ("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 Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 4d528aa725fda..b03b5c6fd5716 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)