linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: remove memset before memcpy
@ 2017-08-29 19:03 Himanshu Jha
  2017-09-02 12:39 ` Oded Gabbay
  0 siblings, 1 reply; 2+ messages in thread
From: Himanshu Jha @ 2017-08-29 19:03 UTC (permalink / raw)
  To: airlied
  Cc: alexander.deucher, oded.gabbay, dri-devel, amd-gfx, linux-kernel,
	Himanshu Jha

calling memcpy immediately after memset with the same region of memory
makes memset redundant.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index 1cae95e..03bec76 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -143,7 +143,6 @@ int pqm_create_queue(struct process_queue_manager *pqm,
 	int num_queues = 0;
 	struct queue *cur;
 
-	memset(&q_properties, 0, sizeof(struct queue_properties));
 	memcpy(&q_properties, properties, sizeof(struct queue_properties));
 	q = NULL;
 	kq = NULL;
-- 
2.7.4

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

* Re: [PATCH] drm/amdkfd: remove memset before memcpy
  2017-08-29 19:03 [PATCH] drm/amdkfd: remove memset before memcpy Himanshu Jha
@ 2017-09-02 12:39 ` Oded Gabbay
  0 siblings, 0 replies; 2+ messages in thread
From: Oded Gabbay @ 2017-09-02 12:39 UTC (permalink / raw)
  To: Himanshu Jha
  Cc: David Airlie, Alex Deucher, Maling list - DRI developers,
	amd-gfx list, Linux-Kernel@Vger. Kernel. Org

On Tue, Aug 29, 2017 at 10:03 PM, Himanshu Jha
<himanshujha199640@gmail.com> wrote:
> calling memcpy immediately after memset with the same region of memory
> makes memset redundant.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> index 1cae95e..03bec76 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> @@ -143,7 +143,6 @@ int pqm_create_queue(struct process_queue_manager *pqm,
>         int num_queues = 0;
>         struct queue *cur;
>
> -       memset(&q_properties, 0, sizeof(struct queue_properties));
>         memcpy(&q_properties, properties, sizeof(struct queue_properties));
>         q = NULL;
>         kq = NULL;
> --
> 2.7.4
>

Thanks!
Applied to amdkfd -next tree

Oded

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

end of thread, other threads:[~2017-09-02 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 19:03 [PATCH] drm/amdkfd: remove memset before memcpy Himanshu Jha
2017-09-02 12:39 ` Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).