All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: amdgpu: Clean up function calls
@ 2016-01-20 17:08 StDenis, Tom
  2016-01-21  4:03 ` Michel Dänzer
  0 siblings, 1 reply; 2+ messages in thread
From: StDenis, Tom @ 2016-01-20 17:08 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org


[-- Attachment #1.1: Type: text/plain, Size: 103 bytes --]

Attached is a simple patch to move a couple of memsets after variable declarations.


Tom St Denis

[-- Attachment #1.2: Type: text/html, Size: 511 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-amdgpu-Move-memset-after-variable-declarations.patch --]
[-- Type: text/x-patch; name="0001-amdgpu-Move-memset-after-variable-declarations.patch", Size: 1429 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: amdgpu: Clean up function calls
  2016-01-20 17:08 [PATCH] drm: amdgpu: Clean up function calls StDenis, Tom
@ 2016-01-21  4:03 ` Michel Dänzer
  0 siblings, 0 replies; 2+ messages in thread
From: Michel Dänzer @ 2016-01-21  4:03 UTC (permalink / raw)
  To: StDenis, Tom; +Cc: dri-devel@lists.freedesktop.org


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!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-21  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 17:08 [PATCH] drm: amdgpu: Clean up function calls StDenis, Tom
2016-01-21  4:03 ` Michel Dänzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.