Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806AbdH2TDx (ORCPT ); Tue, 29 Aug 2017 15:03:53 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33782 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbdH2TDu (ORCPT ); Tue, 29 Aug 2017 15:03:50 -0400 X-Google-Smtp-Source: ADKCNb7vSeDq1g9+7LqnDXbN/bVfb6fwiiUcRHCFXrbjCIbxYVcchus0tsxaV0CVmZwqc6phNYaWRw== From: Himanshu Jha To: airlied@linux.ie Cc: alexander.deucher@amd.com, oded.gabbay@gmail.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Himanshu Jha Subject: [PATCH] drm/amdkfd: remove memset before memcpy Date: Wed, 30 Aug 2017 00:33:35 +0530 Message-Id: <1504033415-25608-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 816 Lines: 22 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