mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net: octeontx2: fix building without DEBUGFS
@ 2026-10-27 15:17 Arnd Bergmann
  2026-10-27 15:54 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-10-27 15:17 UTC (permalink / raw)
  To: Sunil Goutham, Ratheesh Kannoth, Geetha sowjanya,
	Subbaraya Sundeep, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Arnd Bergmann, Suman Ghosh, Nitin Shetty J, Hariprasad Kelam,
	Jiangshan Yi, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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 the 8 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: 45229e9a9ab5 ("octeontx2-af: Extend debugfs support for cn20k NIX")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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 | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
index fb4870cd18e9..3b647e7b4bc2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
@@ -649,9 +649,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


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

* Re: [PATCH] net: octeontx2: fix building without DEBUGFS
  2026-10-27 15:17 [PATCH] net: octeontx2: fix building without DEBUGFS Arnd Bergmann
@ 2026-10-27 15:54 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2026-10-27 15:54 UTC (permalink / raw)
  To: Arnd Bergmann, Sunil Goutham, Ratheesh Kannoth, Geetha sowjanya,
	Subbaraya Sundeep Bhatta, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Suman Ghosh, Nitin Shetty J, hariprasad, Jiangshan Yi, Netdev,
	linux-kernel

On Tue, Oct 27, 2026, at 16:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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,
>

Please ignore this patch, it was not the correct version. I'll send v2.

      Arnd

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

end of thread, other threads:[~2026-10-27 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 15:17 [PATCH] net: octeontx2: fix building without DEBUGFS Arnd Bergmann
2026-10-27 15:54 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®