blob: a244bd9f32f73620a94a57580e93436f788add2b (
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 b4915f697aba1e1455fbe58c5d335862d95f4810 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 1248/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 5f2f0ff..c03b1e2 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
@@ -126,14 +126,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
|