]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix debugfs creation/removal, again
authorArnd Bergmann <arnd@arndb.de>
Thu, 3 Dec 2020 23:06:43 +0000 (00:06 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Dec 2020 04:02:05 +0000 (23:02 -0500)
commit5988de54d1bdfd0808b610e34a0c7c7fa12c6bb3
treec4755492a8bd8f4cedeae088dc07db4f21c14666
parent6fc8d48250a8697fcf4719f8269d5cb8993d0dfe
drm/amdgpu: fix debugfs creation/removal, again

There is still a warning when CONFIG_DEBUG_FS is disabled:

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1145:13: error: 'amdgpu_ras_debugfs_create_ctrl_node' defined but not used [-Werror=unused-function]
 1145 | static void amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)

Change the code again to make the compiler actually drop
this code but not warn about it.

Fixes: c51ccc43b716 ("drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS")
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h