| From 7f0c8dcce9671750ef57f8f294980b3dc1256d8b Mon Sep 17 00:00:00 2001 | |
| From: Sasha Levin <sashal@kernel.org> | |
| Date: Thu, 5 Nov 2026 17:19:13 +0100 | |
| Subject: net: octeontx2: fix building without DEBUGFS | |
| From: Arnd Bergmann <arnd@arndb.de> | |
| [ Upstream commit 2007f7e37142ebdb341949dca8098f898cc871f7 ] | |
| 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. | |
| Fixes: 528530dff56b ("octeontx2-af: npc: cn20k: add debugfs support") | |
| Signed-off-by: Arnd Bergmann <arnd@arndb.de> | |
| Acked-by: Ratheesh Kannoth <rkannoth@marvell.com> | |
| Link: https://patch.msgid.link/20261105161945.1658464-1-arnd@kernel.org | |
| Signed-off-by: Jakub Kicinski <kuba@kernel.org> | |
| Signed-off-by: Sasha Levin <sashal@kernel.org> | |
| --- | |
| drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 5 ----- | |
| 1 file changed, 5 deletions(-) | |
| diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h | |
| index 094227404ef9f..f91478f656615 100644 | |
| --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h | |
| +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h | |
| @@ -75,8 +75,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; | |
| @@ -111,7 +109,6 @@ struct rvu_debugfs { | |
| int npa_qsize_id; | |
| int nix_qsize_id; | |
| }; | |
| -#endif | |
| struct rvu_work { | |
| struct work_struct work; | |
| @@ -648,9 +645,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 */ | |
| -- | |
| 2.53.0 | |