aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4432-drm-amdgpu-remove-set-but-not-used-variable-count.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4432-drm-amdgpu-remove-set-but-not-used-variable-count.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4432-drm-amdgpu-remove-set-but-not-used-variable-count.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4432-drm-amdgpu-remove-set-but-not-used-variable-count.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4432-drm-amdgpu-remove-set-but-not-used-variable-count.patch
new file mode 100644
index 00000000..f62a8d1d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4432-drm-amdgpu-remove-set-but-not-used-variable-count.patch
@@ -0,0 +1,52 @@
+From b743e01c90ccb4a6f7c412d3e2bb19791266c3b9 Mon Sep 17 00:00:00 2001
+From: yu kuai <yukuai3@huawei.com>
+Date: Wed, 13 Nov 2019 20:44:30 +0800
+Subject: [PATCH 4432/4736] drm/amdgpu: remove set but not used variable
+ 'count'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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: e42051d2133b ("drm/amdkfd: Implement GPU reset handlers in KFD")
+Signed-off-by: yu kuai <yukuai3@huawei.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rahul Kumar <rahul.kumar1@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+index eb5eeba8792d..3827ace06f9b 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+@@ -759,7 +759,7 @@ int kgd2kfd_post_reset(struct kfd_dev *kfd)
+ if (kfd_flag_for_rv2)
+ return 0;
+
+- int ret, count;
++ int ret;
+
+ if (!kfd->init_complete)
+ return 0;
+@@ -767,7 +767,7 @@ int kgd2kfd_post_reset(struct kfd_dev *kfd)
+ ret = kfd_resume(kfd);
+ if (ret)
+ return ret;
+- count = atomic_dec_return(&kfd_locked);
++ atomic_dec(&kfd_locked);
+
+ atomic_set(&kfd->sram_ecc_flag, 0);
+
+--
+2.17.1
+