From 5a1253dea09a3b182a7ac2abfc8319e961c980f9 Mon Sep 17 00:00:00 2001
From: Tom St Denis <tom.stdenis@amd.com>
Date: Wed, 20 Jan 2016 09:37:36 -0500
Subject: [PATCH] amdgpu: Move memset() after variable declarations
To make the code more "C" like move the function calls
after the variable declarations.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
src/amdgpu_bo_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -243,9 +243,9 @@ void amdgpu_bo_unref(struct amdgpu_buffer **buffer)
int amdgpu_query_bo_size(amdgpu_bo_handle buf_handle, uint32_t *size)
{
struct amdgpu_bo_info buffer_info;
- memset(&buffer_info, 0, sizeof(struct amdgpu_bo_info));
int ret;
+ memset(&buffer_info, 0, sizeof(struct amdgpu_bo_info));
ret = amdgpu_bo_query_info(buf_handle, &buffer_info);
if (ret)
*size = 0;
@@ -261,9 +261,9 @@ int amdgpu_query_heap_size(amdgpu_device_handle pDev,
uint64_t *max_allocation)
{
struct amdgpu_heap_info heap_info;
- memset(&heap_info, 0, sizeof(struct amdgpu_heap_info));
int ret;
+ memset(&heap_info, 0, sizeof(struct amdgpu_heap_info));
ret = amdgpu_query_heap_info(pDev, heap, 0, &heap_info);
if (ret) {
*heap_size = 0;
--
2.7.0