From c9ab96e2e8a9fc43994c41fa1f6b772a07e90fe3 Mon Sep 17 00:00:00 2001 From: Kent Russell 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 --- 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