Commit c699b05c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Alex Deucher

drm/amdgpu: fw_attestation: fix unused function warning

Without debugfs, the compiler notices one function that is not used at
all:

drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:123:12: error: unused function 'amdgpu_is_fw_attestation_supported' [-Werror,-Wunused-function]

In fact the static const amdgpu_fw_attestation_debugfs_ops structure is
also unused here, but that warning is currently disabled.

Removing the #ifdef check does the right thing and leads to all of this
code to be dropped without warning.

Fixes: 19ae3330 ("drm/amdgpu: added support for psp fw attestation")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 048faf27
...@@ -130,7 +130,6 @@ static int amdgpu_is_fw_attestation_supported(struct amdgpu_device *adev) ...@@ -130,7 +130,6 @@ static int amdgpu_is_fw_attestation_supported(struct amdgpu_device *adev)
void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev) void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev)
{ {
#if defined(CONFIG_DEBUG_FS)
if (!amdgpu_is_fw_attestation_supported(adev)) if (!amdgpu_is_fw_attestation_supported(adev))
return; return;
...@@ -139,5 +138,4 @@ void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev) ...@@ -139,5 +138,4 @@ void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev)
adev_to_drm(adev)->primary->debugfs_root, adev_to_drm(adev)->primary->debugfs_root,
adev, adev,
&amdgpu_fw_attestation_debugfs_ops); &amdgpu_fw_attestation_debugfs_ops);
#endif
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment