Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620AbdIBMkc (ORCPT ); Sat, 2 Sep 2017 08:40:32 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:32878 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037AbdIBMkb (ORCPT ); Sat, 2 Sep 2017 08:40:31 -0400 X-Google-Smtp-Source: ADKCNb74TJEUS6050CYBzm2EWnY9N6Z994Vht/i5cuj/0NZsWu+f8sJ4PHkJ1cr7UB+wMP9I47fw1viDo1CbLe4TUgc= MIME-Version: 1.0 In-Reply-To: <1504033415-25608-1-git-send-email-himanshujha199640@gmail.com> References: <1504033415-25608-1-git-send-email-himanshujha199640@gmail.com> From: Oded Gabbay Date: Sat, 2 Sep 2017 15:39:59 +0300 Message-ID: Subject: Re: [PATCH] drm/amdkfd: remove memset before memcpy To: Himanshu Jha Cc: David Airlie , Alex Deucher , Maling list - DRI developers , amd-gfx list , "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 30 On Tue, Aug 29, 2017 at 10:03 PM, Himanshu Jha wrote: > calling memcpy immediately after memset with the same region of memory > makes memset redundant. > > Signed-off-by: Himanshu Jha > --- > 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