xf86-video-amdgpu: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Jan 20 19:55:55 PST 2016


 src/amdgpu_bo_helper.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 54c959c163288caa87f612911b70df73f87d29d6
Author: Tom St Denis <tom.stdenis at amd.com>
Date:   Wed Jan 20 09:37:36 2016 -0500

    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 at amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 1329c4c..65f1ac6 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;


More information about the xorg-commit mailing list