diff mbox series

mt76: mt7915: fix misplaced #ifdef

Message ID 20210103135811.3749775-1-arnd@kernel.org
State New
Headers show
Series mt76: mt7915: fix misplaced #ifdef | expand

Commit Message

Arnd Bergmann Jan. 3, 2021, 1:57 p.m. UTC
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(-)

Comments

Petr Štetiar Jan. 6, 2021, 1:58 p.m. UTC | #1
Arnd Bergmann <arnd@kernel.org> [2021-01-03 14:57:55]:

Hi,

just a small nitpick,

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

I think, that the correct fixes tag is following:

 Fixes: 8aa2c6f4714e ("mt76: mt7915: support 32 station interfaces")

I've used the af901eb4ab80 as well first in
https://github.com/openwrt/mt76/pull/490 but then looked at it once more and
actually found the probably correct 8aa2c6f4714e.

Cheers,

Petr
Kalle Valo Jan. 14, 2021, 4:54 p.m. UTC | #2
Arnd Bergmann <arnd@kernel.org> wrote:

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

This was already fixed by:

0bd157fa2aaa mt76: mt7915: fix MESH ifdef block

Recorded preimage for 'drivers/net/wireless/mediatek/mt76/mt7915/init.c'
error: Failed to merge in the changes.
Applying: mt76: mt7915: fix misplaced #ifdef
Using index info to reconstruct a base tree...
M	drivers/net/wireless/mediatek/mt76/mt7915/init.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/mediatek/mt76/mt7915/init.c
CONFLICT (content): Merge conflict in drivers/net/wireless/mediatek/mt76/mt7915/init.c
Patch failed at 0001 mt76: mt7915: fix misplaced #ifdef
The copy of the patch that failed is found in: .git/rebase-apply/patch

Patch set to Superseded.
diff mbox series

Patch

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)