Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10564680rwp; Fri, 21 Jul 2023 00:56:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHNc66WIBjVJv2j+yvHWM6KbCvY1TnbYBQNrrL/jG208vNs5KtzZQCXAEnNl4/Xq+PNZlje X-Received: by 2002:a05:6808:1598:b0:3a1:e3ee:742a with SMTP id t24-20020a056808159800b003a1e3ee742amr1744690oiw.8.1689926184292; Fri, 21 Jul 2023 00:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689926184; cv=none; d=google.com; s=arc-20160816; b=ebBuUjGdYYW3FfXod62x9OU1YtSv7dsgLukdVemPcCB6nuSwsuGwXJEvKPQwdZzUt2 xCLuIEDunmqj5SRrfpXle3eQLKU6jQBpLdeiWukKHpciAQNX0QvuGSu0UWfTjobDL9ck gsf9rKYtz6bKajutUOAwYczBx2ITQLWAt2U8WFM8CXyhPbt6X7lpqislhpHQP68Kjf+g prGexZdwM9QPavSOHT8higFMRSqIujE+sJTUe3CGu3q4vY+mgIaAlAhpcJlJfyVFUP3o 7yYASU2OgsUhu8nNXsxgKX1GNrk4jY9cq4jrmFbaO0PmnJvvSSYpixdbkohzjQST+6rd PlTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=ivI4NJNzQNYtXG16p6K8vsYljfV6x27eUeJ3b5uXjvA=; fh=wii94IE1h4Pd4n0vTLJvjXNQ2c4AKXokbegzlZo+4y8=; b=feDOwY6h8ECXglorI9ZrW20z2ifzYy8m7ckVxTeaJkCbfFzx4ADtUNvaoO5hJbhob3 oZd6V+dRg9pdBDNGlGwKbvlijMIiw5vm4hqnxOI0R8wzdXhA8OdhsscDkHvp+AJrY1yX dU/3ruljlHZP/TageD6paXQP4RZUo9IoLPPh9ZB/RODVAn6jH4ciajyHg2W10LE1fWk1 OSiG5TqjQ/VcZTNjtRLuJi4LeCBLeUXXo3mgRnyUxpGqFUchIL4Dfevijt8JeFpZI4Z7 u91OBcWq7Ex1dW6GlUsDFj+pZm7lm5HjxsaGoOu4aTl9aBqv5ZwxRXs0VCszmFDUdskp rWEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@208.org header.s=dkim header.b="OBDKR9/3"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020a63f516000000b0055c4c9cc010si2358842pgh.481.2023.07.21.00.55.58; Fri, 21 Jul 2023 00:56:24 -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=temperror (no key for signature) header.i=@208.org header.s=dkim header.b="OBDKR9/3"; 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 S230355AbjGUHgT (ORCPT + 99 others); Fri, 21 Jul 2023 03:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbjGUHgJ (ORCPT ); Fri, 21 Jul 2023 03:36:09 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1554C35B3 for ; Fri, 21 Jul 2023 00:35:51 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R6hDf3FqhzBRDtS for ; Fri, 21 Jul 2023 15:35:46 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1689924946; x=1692516947; bh=ghmjDEgtqSRRrbuHI35x1NA5O8r aUUrCSsPuWid/CrM=; b=OBDKR9/3guE/3AvYaX7be3eVrexxmVW/fy1fOEvKaxf Cmlb5oDCMaWgK0MCWAsjVO5a1yyfap9uIaXluG/HYOYNJ9sV/8PWNXK/5HQdc0Hu O5lN8xD3RtioXQbra5QR+GlflzmuHpT3du7wamZVm2uiYnAiGXaBOCXXV5AAT0MY 8VjvRF3QvmzTyvVfoAnffGsiUqEtdumKu4s2uCWSHQUEYi7dSE5TG8ai4vgfcZbq t1xbOHWHGV+KPpdzw67XSpS9JoLL8ak8bPH0BlNQVkzYlF0wm5KDvYig1gP9KIm1 A/CEaMed0YfYFpICYNTCRYpWs+ItdWo0JZ0a1TnrWZA== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zLsQyaBcRpbe for ; Fri, 21 Jul 2023 15:35:46 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R6hDf1184zBRDt0; Fri, 21 Jul 2023 15:35:46 +0800 (CST) MIME-Version: 1.0 Date: Fri, 21 Jul 2023 07:35:46 +0000 From: sunran001@208suo.com To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call In-Reply-To: <20230721073440.5402-1-xujianghui@cdjrlc.com> References: <20230721073440.5402-1-xujianghui@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <0bd20a5f09b3419e1d4d8c2b6786e886@208suo.com> X-Sender: sunran001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 dma_alloc_coherent() already clear the allocated memory, there is no need to explicitly call memset(). Signed-off-by: Ran Sun --- drivers/dma/idxd/device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 7c74bc60f582..72330876d40a 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -792,7 +792,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd) evl->log_size = size; evl->bmap = bmap; - memset(&evlcfg, 0, sizeof(evlcfg)); evlcfg.bits[0] = dma_addr & GENMASK(63, 12); evlcfg.size = evl->size;