Commit a1bd079f authored by yu kuai's avatar yu kuai Committed by Alex Deucher

drm/amdgpu: remove set but not used variable 'count'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdkfd/kfd_device.c: In function
‘kgd2kfd_post_reset’:
drivers/gpu/drm/amd/amdkfd/kfd_device.c:745:11: warning:
variable ‘count’ set but not used [-Wunused-but-set-variable]

'count' is never used, so can be removed. Thus 'atomic_dec_return'
can be replaced as 'atomic_dec'

Fixes: e42051d2 ("drm/amdkfd: Implement GPU reset handlers in KFD")
Signed-off-by: default avataryu kuai <yukuai3@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4f2922d1
...@@ -742,7 +742,7 @@ int kgd2kfd_pre_reset(struct kfd_dev *kfd) ...@@ -742,7 +742,7 @@ int kgd2kfd_pre_reset(struct kfd_dev *kfd)
int kgd2kfd_post_reset(struct kfd_dev *kfd) int kgd2kfd_post_reset(struct kfd_dev *kfd)
{ {
int ret, count; int ret;
if (!kfd->init_complete) if (!kfd->init_complete)
return 0; return 0;
...@@ -750,7 +750,7 @@ int kgd2kfd_post_reset(struct kfd_dev *kfd) ...@@ -750,7 +750,7 @@ int kgd2kfd_post_reset(struct kfd_dev *kfd)
ret = kfd_resume(kfd); ret = kfd_resume(kfd);
if (ret) if (ret)
return ret; return ret;
count = atomic_dec_return(&kfd_locked); atomic_dec(&kfd_locked);
atomic_set(&kfd->sram_ecc_flag, 0); atomic_set(&kfd->sram_ecc_flag, 0);
......
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