Skip to contentSkip to conversation

accel/habanalabs: add more debugfs stub helpers

PATCH In review Arnd Bergmann 4 participants 5 messages Jun 9, 2023 – Jul 20, 2023

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

PATCH 1/1 accel/habanalabs: add more debugfs stub helpers

From: Arnd Bergmann <[email protected]>

Two functions got added with normal prototypes for debugfs, but not alternative when building without it:

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2177:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'hl_debugfs_init'? [-Werror=implicit-function-declaration] drivers/accel/habanalabs/common/device.c:2305:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

Add stubs for these as well.

Fixes 553311fc7b76e ("accel/habanalabs: expose debugfs files later")
---
 drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -0
index d92ba2e30e310..2f027d5a82064 100644
@@ -3980,6 +3980,15 @@ static inline void hl_debugfs_fini(void)
 {
 }
 
+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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Two functions got added with normal prototypes for debugfs, but not alternative when building without it:

Quoted 8 lines

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2177:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'hl_debugfs_init'? [-Werror=implicit-function-declaration] drivers/accel/habanalabs/common/device.c:2305:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

Add stubs for these as well.

Fixes 553311fc7b76e ("accel/habanalabs: expose debugfs files later")

Thanks,

Quoted 24 lines
---
  drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -0
index d92ba2e30e310..2f027d5a82064 100644
@@ -3980,6 +3980,15 @@ static inline void hl_debugfs_fini(void)
  {
  }
 
+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)
  {
  }
maintainer
#2 lore raw
Quoted 11 lines · Tomer Tayar
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Two functions got added with normal prototypes for debugfs, but not alternative when building without it:

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2177:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'hl_debugfs_init'? [-Werror=implicit-function-declaration] drivers/accel/habanalabs/common/device.c:2305:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

Quoted 7 lines
Quoted 4 lines

Add stubs for these as well.

Fixes 553311fc7b76e ("accel/habanalabs: expose debugfs files later")

Thanks,

Thanks,
Applied to -fixes.
Oded

Quoted 27 lines
Quoted 25 lines
---
  drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -0
index d92ba2e30e310..2f027d5a82064 100644
@@ -3980,6 +3980,15 @@ static inline void hl_debugfs_fini(void)
  {
  }
 
+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)
  {
  }
#3 lore raw
Quoted 14 lines · Oded Gabbay
Quoted 13 lines · Tomer Tayar
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Two functions got added with normal prototypes for debugfs, but not alternative when building without it:

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2177:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'hl_debugfs_init'? [-Werror=implicit-function-declaration] drivers/accel/habanalabs/common/device.c:2305:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

Add stubs for these as well.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Fixes 553311fc7b76e ("accel/habanalabs: expose debugfs files later")

Thanks,

Thanks,
Applied to -fixes.

As requested applied to drm-fixes, hopeful for the next one your drm-misc account issue is fixed.
-Daniel

Quoted 28 lines

Oded

Quoted 27 lines
Quoted 25 lines
---
  drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -0
index d92ba2e30e310..2f027d5a82064 100644
@@ -3980,6 +3980,15 @@ static inline void hl_debugfs_fini(void)
  {
  }
 
+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 · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
maintainer
#4 lore raw
Quoted 22 lines · Daniel Vetter
Quoted 20 lines · Oded Gabbay
Quoted 18 lines · Tomer Tayar
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Two functions got added with normal prototypes for debugfs, but not alternative when building without it:

Quoted 8 lines

drivers/accel/habanalabs/common/device.c: In function 'hl_device_init':
drivers/accel/habanalabs/common/device.c:2177:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'hl_debugfs_init'? [-Werror=implicit-function-declaration] drivers/accel/habanalabs/common/device.c:2305:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration]

Add stubs for these as well.

Fixes 553311fc7b76e ("accel/habanalabs: expose debugfs files later")

Thanks,

Quoted 6 lines
Quoted 2 lines

Thanks,
Applied to -fixes.

As requested applied to drm-fixes, hopeful for the next one your drm-misc account issue is fixed.
-Daniel

Thanks Daniel for the help.
I also hope it will be fixed :)
Oded

Quoted 34 lines
Quoted 29 lines

Oded

Quoted 27 lines
Quoted 25 lines
---
  drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/accel/habanalabs/common/habanalabs.h +9 -0
index d92ba2e30e310..2f027d5a82064 100644
@@ -3980,6 +3980,15 @@ static inline void hl_debugfs_fini(void)
  {
  }
 
+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)
  {
  }

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch