Skip to contentSkip to conversation

accel/habanalabs: add missing debugfs function stubs

PATCH Applied Arnd Bergmann 2 participants 2 messages Sep 27, 2023 – Sep 28, 2023

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

PATCH 1/1 accel/habanalabs: add missing debugfs function stubs

From: Arnd Bergmann <[email protected]>

Two function stubs were removed in an earlier commit but are now needed again:

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2231:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'drm_debugfs_dev_init'? [-Werror=implicit-function-declaration]
2231 | rc = hl_debugfs_device_init(hdev);
drivers/accel/habanalabs/common/device.c:2367:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

 2367 |         hl_debugfs_device_fini(hdev);
      |         ^~~~~~~~~~~~~~~~~~~~~~
Fixes 3b9abb4fa642e ("accel/habanalabs: expose debugfs files later")
Fixes 09fe78d2e4421 ("accel/habanalabs: register compute device as an accel device")
---
 drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -0
index 2a3acdbf91714..1655c101c7052 100644
@@ -4041,6 +4041,15 @@ void hl_debugfs_set_state_dump(struct hl_device *hdev, char *data,
 
 #else
 
+static inline int hl_debugfs_device_init(struct hl_device *hdev)
+{
+	return 0;
+}
+
+static inline void hl_debugfs_device_fini(struct hl_device *hdev)
+{
+}
+
 static inline void hl_debugfs_add_device(struct hl_device *hdev)
 {
 }
Signature · 1 line
2.39.2
maintainer Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 41 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Two function stubs were removed in an earlier commit but are now needed again:

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2231:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'drm_debugfs_dev_init'? [-Werror=implicit-function-declaration]
2231 | rc = hl_debugfs_device_init(hdev);
drivers/accel/habanalabs/common/device.c:2367:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

 2367 |         hl_debugfs_device_fini(hdev);
      |         ^~~~~~~~~~~~~~~~~~~~~~
Fixes 3b9abb4fa642e ("accel/habanalabs: expose debugfs files later")
Fixes 09fe78d2e4421 ("accel/habanalabs: register compute device as an accel device")
---
 drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -1
index 2a3acdbf91714..1655c101c7052 100644
@@ -4041,6 +4041,15 @@ void hl_debugfs_set_state_dump(struct hl_device *hdev, char *data,
 
 #else
 
+static inline int hl_debugfs_device_init(struct hl_device *hdev)
+{
+       return 0;
+}
+
+static inline void hl_debugfs_device_fini(struct hl_device *hdev)
+{
+}
+
 static inline void hl_debugfs_add_device(struct hl_device *hdev)
 {
 }
--
Quoted 2 lines

2.39.2

Applied to -next
Thanks,
Oded