aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1634-drm-amdkfd-Address-uninitialized-variable-warning.patch
blob: e1e0d642c8a2e7ca2aeeb259fd4299069671a3cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From c9ab96e2e8a9fc43994c41fa1f6b772a07e90fe3 Mon Sep 17 00:00:00 2001
From: Kent Russell <kent.russell@amd.com>
Date: Tue, 28 Mar 2017 10:11:01 -0400
Subject: [PATCH 1634/4131] drm/amdkfd: Address uninitialized variable warning

While we use the pointers to these variables in pm_allocate_runlist_ib,
gcc 5 is complaining that it may be used uninitialized, so set it
explicitly to fix the warning.

Change-Id: I1b67fa1576a05b7aa5fba712f6a3959956f3bb6a
Signed-off-by: Kent Russell <kent.russell@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
index f7c99ad..a188ad7 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
@@ -125,14 +125,14 @@ static int pm_create_runlist_ib(struct packet_manager *pm,
 				uint64_t *rl_gpu_addr,
 				size_t *rl_size_bytes)
 {
-	unsigned int alloc_size_bytes;
+	unsigned int alloc_size_bytes = 0;
 	unsigned int *rl_buffer, rl_wptr, i;
 	int retval, proccesses_mapped;
 	struct device_process_node *cur;
 	struct qcm_process_device *qpd;
 	struct queue *q;
 	struct kernel_queue *kq;
-	bool is_over_subscription;
+	bool is_over_subscription = false;
 
 	BUG_ON(!pm || !queues || !rl_size_bytes || !rl_gpu_addr);
 
-- 
2.7.4