diff mbox

drm: amdgpu: Clean up function calls

Message ID DM2PR12MB0095EA8BD86EB00E6EB053FAF7C20@DM2PR12MB0095.namprd12.prod.outlook.com (mailing list archive)
State New, archived
Headers show

Commit Message

StDenis, Tom Jan. 20, 2016, 5:08 p.m. UTC
Attached is a simple patch to move a couple of memsets after variable declarations.


Tom St Denis

Comments

Michel Dänzer Jan. 21, 2016, 4:03 a.m. UTC | #1
Please submit patches for review with git send-email.

Please send xf86-video-amdgpu patches to the xorg-driver-ati@lists.x.org
list with a [PATCH xf86-video-amdgpu] subject prefix.


On 21.01.2016 02:08, StDenis, Tom wrote:
> Subject: [PATCH] amdgpu: Move memset() after variable declarations

The "amdgpu: " prefix is superfluous, so I removed that before pushing
the patch. Thanks!
diff mbox

Patch

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(-)

diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 1329c4c4a225..65f1ac693c2b 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -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