From patchwork Sun May 28 14:11:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 99900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp982341vqr; Sun, 28 May 2023 07:22:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xOmSBDj3YLbFGvB+3sWrGKxhn30lpu3oQw0FqV5EYdfBHc57DuUttVO4Jvf9+6OLFMNah X-Received: by 2002:a05:6a00:810:b0:64d:1e10:5000 with SMTP id m16-20020a056a00081000b0064d1e105000mr11742838pfk.14.1685283768754; Sun, 28 May 2023 07:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685283768; cv=none; d=google.com; s=arc-20160816; b=hMkCkpa/XLvXMUWjiQZJEWaPaGw1p/hpSFQgeoxYinYYP1M3savBPV1P5m+VCTQzHz CD4Wkclb+FVOnbaRXkX+Dbf1A+2bPGY1/oblWwltGMi8ShEBUiOu5fp0iqCHOyolZwm/ D25ioQdJbVC5VA67pXLXwbZqNAaakHGlXsqI3v9HJjMt3jocVnwkdnHTeHEl2zwJG/C4 cGExUNWyvdE1r2UlguFZsEtlMmGCa9pvSqp9gGH/QS3TaiFLgWnKa4PtWW+3o+xpIUbT 9bheqMgn5VTP6PA/AT0jZMDFTcu0dD9cJl60uDTeiGYXtmEy+Gu6eq4c87oDMJGeWFOj sacA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y3+xzWyNMJI6Fo1vf7HM2FwwEMDemy6nUMbYmtfSJAo=; b=bvPnu5zKjJGBHV6WAlLJbDJrDgFBpFVNM2ZCVRscWSwPE0+VOEcgRTOfU8+RZOozA6 S/DztCNbQezVxDswR7aIAZIfE5ZJDcCPK5Nl1rMf3cWGhpt/irX2A1tI/GG9n5QRQS7r Ac3FemCUuqkMbWJwLez1e0jR91NFCFxAww9Zo8SbfWrXv/aQ5ZHh7tJmwXvk3Im47WPX s7C1tHrI6HnnvhmBwA5mCvwwZ2ODXhBAkeoy7SMntCqsdo3BwWTT4c/x889D6jBRLk5N aigJWjlycccx2scC3Xw8M9Jzuz4CpgnqrpwgDXRlpnzHCBJu/2a8MhlvBm2tQW165Q33 qLOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=MkqYroq8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z129-20020a626587000000b0064490c20e80si7940152pfb.59.2023.05.28.07.22.34; Sun, 28 May 2023 07:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=MkqYroq8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229450AbjE1OMB (ORCPT + 99 others); Sun, 28 May 2023 10:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjE1OMA (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 6E3F8C7 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767148113077149770?= X-GMAIL-MSGID: =?utf-8?q?1767148113077149770?= dma_alloc_coherent() already clear the allocated memory, there is no need to explicitly call memset(). Signed-off-by: Christophe JAILLET Acked-by: Dave Jiang Acked-by: Fenghua Yu --- 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;