netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7915: fix misplaced #ifdef
@ 2021-01-03 13:57 Arnd Bergmann
  2021-01-06 13:58 ` Petr Štetiar
  2021-01-14 16:54 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-01-03 13:57 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi
  Cc: Arnd Bergmann, Ryder Lee, Kalle Valo, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Shayne Chen, Yiwei Chung,
	linux-wireless, netdev, linux-arm-kernel, linux-mediatek,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The lone '|' at the end of a line causes a build failure:

drivers/net/wireless/mediatek/mt76/mt7915/init.c:47:2: error: expected expression before '}' token

Replace the #ifdef with an equivalent IS_ENABLED() check.

Fixes: af901eb4ab80 ("mt76: mt7915: get rid of dbdc debugfs knob")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index ed4635bd151a..f1fb3ae0f7f2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -40,10 +40,9 @@ static const struct ieee80211_iface_limit if_limits[] = {
 		.types = BIT(NL80211_IFTYPE_ADHOC)
 	}, {
 		.max = 16,
-		.types = BIT(NL80211_IFTYPE_AP) |
-#ifdef CONFIG_MAC80211_MESH
-			 BIT(NL80211_IFTYPE_MESH_POINT)
-#endif
+		.types = BIT(NL80211_IFTYPE_AP)
+			 | IS_ENABLED(CONFIG_MAC80211_MESH) ?
+			   BIT(NL80211_IFTYPE_MESH_POINT) : 0
 	}, {
 		.max = MT7915_MAX_INTERFACES,
 		.types = BIT(NL80211_IFTYPE_STATION)
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-14 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-03 13:57 [PATCH] mt76: mt7915: fix misplaced #ifdef Arnd Bergmann
2021-01-06 13:58 ` Petr Štetiar
2021-01-14 10:44   ` Kalle Valo
2021-01-14 16:54 ` Kalle Valo

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).