From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5BCBC77B7C for ; Sun, 28 May 2023 14:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbjE1OMB (ORCPT ); Sun, 28 May 2023 10:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbjE1OMA (ORCPT ); Sun, 28 May 2023 10:12:00 -0400 Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 661F2BE for ; Sun, 28 May 2023 07:11:58 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 3H7jq4uCWZO7A3H7jqkgSo; Sun, 28 May 2023 16:11:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1685283116; bh=y3+xzWyNMJI6Fo1vf7HM2FwwEMDemy6nUMbYmtfSJAo=; h=From:To:Cc:Subject:Date; b=MkqYroq869dWCNPUaGO8IPR2Eei6nlkHrBoAFM8ZtoR7LOZesAA/wfZThpcPpNDA0 APsGbRNmo+0lERhGQ4/FjUenENWDqx4vGreOPNIxs4kcdqVrkGP1olHL+qIIwLKN82 N+BMfwz78eTUdtkQMesHOA5mhVy+8Bevnp/ND9tWOxcLbwhfMdt7fpho2vY9KPyv8o gjdbB3+OsaRuThkxSvxhQtBdpWp7Qr3KU7I/VS/gqp8DP7RhOwDnb6dOMzdZdd8pDz FcqL/aijEt0h12vC6pT/Ywxtb9nufUKaty2CLRlDyIrSOsYEr5tLh99CXD2LbNo4Rf o7YxqqMVgcqMQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 28 May 2023 16:11:56 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Fenghua Yu , Dave Jiang , Vinod Koul Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , dmaengine@vger.kernel.org Subject: [PATCH] dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call Date: Sun, 28 May 2023 16:11:54 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_alloc_coherent() already clear the allocated memory, there is no need to explicitly call memset(). Signed-off-by: Christophe JAILLET --- drivers/dma/idxd/device.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 5abbcc61c528..7c74bc60f582 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -786,8 +786,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd) goto err_alloc; } - memset(addr, 0, size); - spin_lock(&evl->lock); evl->log = addr; evl->dma = dma_addr; -- 2.34.1