]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: fw_attestation: fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 4 Dec 2020 16:51:20 +0000 (17:51 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Dec 2020 04:02:28 +0000 (23:02 -0500)
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: 19ae333001b3 ("drm/amdgpu: added support for psp fw attestation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c

index e47bca1c763596a23ba85592a2c5237d72e1e143..7c6e02e35573c4c0c907178052d6e406654b5d7e 100644 (file)
@@ -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)
 {
-#if defined(CONFIG_DEBUG_FS)
        if (!amdgpu_is_fw_attestation_supported(adev))
                return;
 
@@ -139,5 +138,4 @@ void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev)
                            adev_to_drm(adev)->primary->debugfs_root,
                            adev,
                            &amdgpu_fw_attestation_debugfs_ops);
-#endif
 }