net: octeontx2: fix building without DEBUGFS
PATCH v2 1/1 net: octeontx2: fix building without DEBUGFS
From: Arnd Bergmann <[email protected]>
This error came up on my randconfig tests this week:
drivers/net/ethernet/marvell/octeontx2/af/cn20k/debugfs.c: In function 'npc_cn20k_debugfs_init':drivers/net/ethernet/marvell/octeontx2/af/cn20k/debugfs.c:392:55: error: 'struct rvu' has no member named 'rvu_dbg'; did you mean 'rvu_dl'?
392 | debugfs_create_file("mcam_layout", 0444, rvu->rvu_dbg.npc,
The problem here is that the rvu_dbg member is hidden in an #ifdef block, but the reference to it is not.
Remove the #ifdef and waste a few bytes in the structure in this config. Note that the debugfs_create_file() call end up ignoring the arguments, so the actual debugfs implementation is still ignored here.
---
v2: fix accidental build regression
pick a better 'Fixes:' reference
I cannot tell why this showed up now and not earlier, so maybe the 'Fixes' line is misplaced. In randconfig builds, debugfs is almost always selected by something else, while the octeontx2 driver is usually disabled, so it does make some sense that this config would be rate.
--- drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 5 ----- 1 file changed, 5 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +0 -5
@@ -76,8 +76,6 @@ static inline int rvu_pcifunc_pf_mask(struct pci_dev *pdev)#define RVU_AFPF 25 -#ifdef CONFIG_DEBUG_FS -struct dump_ctx {int lf;int id;
@@ -112,7 +110,6 @@ struct rvu_debugfs {int npa_qsize_id;int nix_qsize_id; }; -#endif struct rvu_work {struct work_struct work;
@@ -649,9 +646,7 @@ struct rvu {int mcs_blk_cnt;int cpt_pf_num; -#ifdef CONFIG_DEBUG_FS struct rvu_debugfs rvu_dbg; -#endif struct rvu_devlink *rvu_dl;/* RVU switch implementation over NPC with DMAC rules */
Signature · 1 line
2.53.0
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
This error came up on my randconfig tests this week:
drivers/net/ethernet/marvell/octeontx2/af/cn20k/debugfs.c: In function 'npc_cn20k_debugfs_init':drivers/net/ethernet/marvell/octeontx2/af/cn20k/debugfs.c:392:55: error: 'struct rvu' has no member named 'rvu_dbg'; did you mean 'rvu_dl'?
392 | debugfs_create_file("mcam_layout", 0444,rvu->rvu_dbg.npc,The problem here is that the
rvu_dbgmember is hidden in an #ifdef block, but the reference to it is not.
Quoted 7 lines
Remove the #ifdef and waste a few bytes in the structure in this config. Note that the
debugfs_create_file()call end up ignoring the arguments, so the actual debugfs implementation is still ignored here.Fixes 528530dff56b ("octeontx2-af: npc: cn20k: add debugfs support")Signed-off-by Arnd Bergmann <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 5 Nov 2026 17:19:13 +0100 you wrote:
From: Arnd Bergmann <[email protected]>
This error came up on my randconfig tests this week:
drivers/net/ethernet/marvell/octeontx2/af/cn20k/debugfs.c: In function 'npc_cn20k_debugfs_init':drivers/net/ethernet/marvell/octeontx2/af/cn20k/debugfs.c:392:55: error: 'struct rvu' has no member named 'rvu_dbg'; did you mean 'rvu_dl'?
392 | debugfs_create_file("mcam_layout", 0444,rvu->rvu_dbg.npc,[...]
Here is the summary with links:
- [v2] net: octeontx2: fix building without DEBUGFS
https://git.kernel.org/netdev/net/c/2007f7e37142
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html