aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0504-drm-amdgpu-remove-set-but-not-used-variable-header.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0504-drm-amdgpu-remove-set-but-not-used-variable-header.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0504-drm-amdgpu-remove-set-but-not-used-variable-header.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0504-drm-amdgpu-remove-set-but-not-used-variable-header.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0504-drm-amdgpu-remove-set-but-not-used-variable-header.patch
new file mode 100644
index 00000000..95a735a7
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0504-drm-amdgpu-remove-set-but-not-used-variable-header.patch
@@ -0,0 +1,41 @@
+From d09247bf9bd7b7a0131a590e788298e6240e1ce3 Mon Sep 17 00:00:00 2001
+From: YueHaibing <yuehaibing@huawei.com>
+Date: Wed, 26 Sep 2018 14:15:34 +0000
+Subject: [PATCH 0504/2940] drm/amdgpu: remove set but not used variable
+ 'header'
+
+Fixes gcc '-Wunused-but-set-variable' warning:
+
+drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c: In function 'amdgpu_ucode_init_bo':
+drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:431:39: warning:
+ variable 'header' set but not used [-Wunused-but-set-variable]
+
+Signed-off-by: YueHaibing <yuehaibing@huawei.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
+index d91f378bb34d..7b33867036e7 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
+@@ -451,7 +451,6 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
+ uint64_t fw_offset = 0;
+ int i;
+ struct amdgpu_firmware_info *ucode = NULL;
+- const struct common_firmware_header *header = NULL;
+
+ /* for baremetal, the ucode is allocated in gtt, so don't need to fill the bo when reset/suspend */
+ if (!amdgpu_sriov_vf(adev) && (adev->in_gpu_reset || adev->in_suspend))
+@@ -472,7 +471,6 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
+ for (i = 0; i < adev->firmware.max_ucodes; i++) {
+ ucode = &adev->firmware.ucode[i];
+ if (ucode->fw) {
+- header = (const struct common_firmware_header *)ucode->fw->data;
+ amdgpu_ucode_init_single_fw(adev, ucode, adev->firmware.fw_buf_mc + fw_offset,
+ adev->firmware.fw_buf_ptr + fw_offset);
+ if (i == AMDGPU_UCODE_ID_CP_MEC1 &&
+--
+2.17.1
+