diff mbox

[libdrm,11/17] tests/amdgpu: reference the correct variable for memcpy

Message ID 1440434060-31347-11-git-send-email-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Emil Velikov Aug. 24, 2015, 4:34 p.m. UTC
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Leo Liu <leo.liu@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 tests/amdgpu/cs_tests.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Deucher Aug. 24, 2015, 5:05 p.m. UTC | #1
On Mon, Aug 24, 2015 at 12:34 PM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Leo Liu <leo.liu@amd.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  tests/amdgpu/cs_tests.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c
> index 416f36b..dfbf5af 100644
> --- a/tests/amdgpu/cs_tests.c
> +++ b/tests/amdgpu/cs_tests.c
> @@ -266,7 +266,7 @@ static void amdgpu_cs_uvd_decode(void)
>         r = amdgpu_bo_cpu_map(buf_handle, (void **)&ptr);
>         CU_ASSERT_EQUAL(r, 0);
>
> -       memcpy(ptr, uvd_decode_msg, sizeof(uvd_create_msg));
> +       memcpy(ptr, uvd_decode_msg, sizeof(uvd_decode_msg));
>         if (family_id >= AMDGPU_FAMILY_VI)
>                 ptr[0x10] = 7;
>
> @@ -362,7 +362,7 @@ static void amdgpu_cs_uvd_destroy(void)
>         r = amdgpu_bo_cpu_map(buf_handle, &msg);
>         CU_ASSERT_EQUAL(r, 0);
>
> -       memcpy(msg, uvd_destroy_msg, sizeof(uvd_create_msg));
> +       memcpy(msg, uvd_destroy_msg, sizeof(uvd_destroy_msg));
>         if (family_id >= AMDGPU_FAMILY_VI)
>                 ((uint8_t*)msg)[0x10] = 7;
>
> --
> 2.5.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c
index 416f36b..dfbf5af 100644
--- a/tests/amdgpu/cs_tests.c
+++ b/tests/amdgpu/cs_tests.c
@@ -266,7 +266,7 @@  static void amdgpu_cs_uvd_decode(void)
 	r = amdgpu_bo_cpu_map(buf_handle, (void **)&ptr);
 	CU_ASSERT_EQUAL(r, 0);
 
-	memcpy(ptr, uvd_decode_msg, sizeof(uvd_create_msg));
+	memcpy(ptr, uvd_decode_msg, sizeof(uvd_decode_msg));
 	if (family_id >= AMDGPU_FAMILY_VI)
 		ptr[0x10] = 7;
 
@@ -362,7 +362,7 @@  static void amdgpu_cs_uvd_destroy(void)
 	r = amdgpu_bo_cpu_map(buf_handle, &msg);
 	CU_ASSERT_EQUAL(r, 0);
 
-	memcpy(msg, uvd_destroy_msg, sizeof(uvd_create_msg));
+	memcpy(msg, uvd_destroy_msg, sizeof(uvd_destroy_msg));
 	if (family_id >= AMDGPU_FAMILY_VI)
 		((uint8_t*)msg)[0x10] = 7;