Skip to contentSkip to conversation

net: airoha: fix CONFIG_DEBUG_FS check

PATCH Applied Arnd Bergmann 3 participants 3 messages Mar 14, 2025 – Mar 21, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: airoha: fix CONFIG_DEBUG_FS check

From: Arnd Bergmann <[email protected]>

The #if check causes a build failure when CONFIG_DEBUG_FS is turned off:

In file included from drivers/net/ethernet/airoha/airoha_eth.c:17:
drivers/net/ethernet/airoha/airoha_eth.h:543:5: error: "CONFIG_DEBUG_FS" is not defined, evaluates to 0 [-Werror=undef]
543 | #if CONFIG_DEBUG_FS

      |     ^~~~~~~~~~~~~~~

Replace it with the correct #ifdef.

Fixes 3fe15c640f38 ("net: airoha: Introduce PPE debugfs support")
---
 drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_eth.h +1 -1
index f66b9b736b94..60690b685710 100644
@@ -540,7 +540,7 @@ void airoha_ppe_deinit(struct airoha_eth *eth);
 struct airoha_foe_entry *airoha_ppe_foe_get_entry(struct airoha_ppe *ppe,
 						  u32 hash);
 
-#if CONFIG_DEBUG_FS
+#ifdef CONFIG_DEBUG_FS
 int airoha_ppe_debugfs_init(struct airoha_ppe *ppe);
 #else
 static inline int airoha_ppe_debugfs_init(struct airoha_ppe *ppe)
Signature · 1 line
2.39.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

From: Arnd Bergmann <[email protected]>

The #if check causes a build failure when CONFIG_DEBUG_FS is turned off:

In file included from drivers/net/ethernet/airoha/airoha_eth.c:17:
drivers/net/ethernet/airoha/airoha_eth.h:543:5: error: "CONFIG_DEBUG_FS" is not defined, evaluates to 0 [-Werror=undef]
543 | #if CONFIG_DEBUG_FS

Quoted 6 lines
      |     ^~~~~~~~~~~~~~~

Replace it with the correct #ifdef.

Fixes 3fe15c640f38 ("net: airoha: Introduce PPE debugfs support")
Quoted 20 lines
---
 drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_eth.h +1 -1
index f66b9b736b94..60690b685710 100644
@@ -540,7 +540,7 @@ void airoha_ppe_deinit(struct airoha_eth *eth);
 struct airoha_foe_entry *airoha_ppe_foe_get_entry(struct airoha_ppe *ppe,
 						  u32 hash);
 
-#if CONFIG_DEBUG_FS
+#ifdef CONFIG_DEBUG_FS
 int airoha_ppe_debugfs_init(struct airoha_ppe *ppe);
 #else
 static inline int airoha_ppe_debugfs_init(struct airoha_ppe *ppe)
Signature · 1 line
2.39.5
#2 lore raw
In reply to Arnd Bergmann
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 11 lines · On Fri, 14 Mar 2025 16:49:59 +0100 you wrote:

From: Arnd Bergmann <[email protected]>

The #if check causes a build failure when CONFIG_DEBUG_FS is turned off:

In file included from drivers/net/ethernet/airoha/airoha_eth.c:17:
drivers/net/ethernet/airoha/airoha_eth.h:543:5: error: "CONFIG_DEBUG_FS" is not defined, evaluates to 0 [-Werror=undef]
543 | #if CONFIG_DEBUG_FS

      |     ^~~~~~~~~~~~~~~

[...]

Here is the summary with links:
- net: airoha: fix CONFIG_DEBUG_FS check

    https://git.kernel.org/netdev/net-next/c/08d0185e36ad

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html