Skip to contentSkip to conversation

staging: vchiq_debugfs: Fix build if CONFIG_DEBUG_FS is not set

PATCH In review Bernhard Rosenkränzer 3 participants 3 messages Jun 27, 2024 – Jun 28, 2024

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

PATCH 1/1 staging: vchiq_debugfs: Fix build if CONFIG_DEBUG_FS is not set

Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state") adds a parameter to vchiq_debugfs_init, but leaves the dummy implementation in the !CONFIG_DEBUG_FS case untouched, causing a compile time error.

Fixes c3552ab19aeb ("staging: vchiq_debugfs: Fix NPD in vchiq_dump_state")
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +1 -1
index 1f74d0bb33bae..d5f7f61c56269 100644
@@ -138,7 +138,7 @@ void vchiq_debugfs_deinit(void)
 
 #else /* CONFIG_DEBUG_FS */
 
-void vchiq_debugfs_init(void)
+void vchiq_debugfs_init(struct vchiq_state *state)
 {
 }
 
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw

Am 27.06.24 um 14:44 schrieb Bernhard Rosenkränzer:

Quoted 7 lines

Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state") adds a parameter to vchiq_debugfs_init, but leaves the dummy implementation in the !CONFIG_DEBUG_FS case untouched, causing a compile time error.

Fixes c3552ab19aeb ("staging: vchiq_debugfs: Fix NPD in vchiq_dump_state")

Oh dear, thanks for fixing

#2 lore raw
In reply to Bernhard Rosenkränzer

Hi Bernhard,

Am Donnerstag, 27. Juni 2024, 14:44:19 MESZ schrieb Bernhard Rosenkränzer:

Quoted 16 lines

Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state") adds a parameter to vchiq_debugfs_init, but leaves the dummy implementation in the !CONFIG_DEBUG_FS case untouched, causing a compile time error.

Fixes c3552ab19aeb ("staging: vchiq_debugfs: Fix NPD in vchiq_dump_state")
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0 -0
index 1f74d0bb33bae..d5f7f61c56269 100644

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c void vchiq_debugfs_deinit(void) · line 144

Quoted 8 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +1 -1
@@ -138,7 +138,7 @@ void vchiq_debugfs_deinit(void)
 
 #else /* CONFIG_DEBUG_FS */
 
-void vchiq_debugfs_init(void)
+void vchiq_debugfs_init(struct vchiq_state *state)
 {
 }
 

How about encapsulating the code inside if (IS_ENABLED(CONFIG_DEBUG_FS)) and remove the #ifdef CONFIG_DEBUG_FS alltogether? AFAIK this will do a compile test even if CONFIG_DEBUG_FS is unset.

Best regards,
Alexander