Skip to contentSkip to conversation

gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not set

PATCH In review Alexander Kuleshov 2 participants 2 messages Jun 27, 2015 – Jun 29, 2015

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

PATCH 1/1 gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not set

If the CONFIG_DEBUG_FS is not selected, compilation of the drivers/gpu/drm/amd/amdgpu/amdgpu_device.c provides two warnings that amdgpu_debugfs_regs_init and amdgpu_debugfs_regs_cleanup are used but never defined. And as result:

ERROR: "amdgpu_debugfs_regs_cleanup" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "amdgpu_debugfs_regs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

            ^
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -1
index fec487d..6896798 100644
@@ -2000,5 +2000,10 @@ int amdgpu_debugfs_init(struct drm_minor *minor)
 void amdgpu_debugfs_cleanup(struct drm_minor *minor)
 {
 }
+#else
+static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
+{
+	return 0;
+}
+static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev) { }
 #endif
--

2.4.4.410.gc71d752

Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Alexander Kuleshov

If the CONFIG_DEBUG_FS is not selected, compilation of the drivers/gpu/drm/amd/amdgpu/amdgpu_device.c provides two warnings that amdgpu_debugfs_regs_init and amdgpu_debugfs_regs_cleanup are used but never defined. And as result:

ERROR: "amdgpu_debugfs_regs_cleanup" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "amdgpu_debugfs_regs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

             ^
Quoted 22 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -1
index fec487d..6896798 100644
@@ -2000,5 +2000,10 @@ int amdgpu_debugfs_init(struct drm_minor *minor)
  void amdgpu_debugfs_cleanup(struct drm_minor *minor)
  {
  }
+#else
+static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
+{
+	return 0;
+}
+static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev) { }
  #endif
--

2.4.4.410.gc71d752

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel