From patchwork Mon Mar 13 21:52:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 69158 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1428926wrd; Mon, 13 Mar 2023 15:01:18 -0700 (PDT) X-Google-Smtp-Source: AK7set+6EoXtBQTtea02XrRlJXVddzFKoTH8saVPMWw8k9mfP5EMtW1w/YKit5N4AXqDHtz+W4+e X-Received: by 2002:a17:90a:7895:b0:23b:5454:738b with SMTP id x21-20020a17090a789500b0023b5454738bmr5785415pjk.43.1678744878683; Mon, 13 Mar 2023 15:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678744878; cv=none; d=google.com; s=arc-20160816; b=qKmBIwXfiiCDMnZ9JVUztQBOnNt+PtLVvA0JWQY3AtyIj2hFtWyuc+k3NjxDq4hGhB 5s7qQfK3dWA3jJOYhM9GMa4TLnK7RypHl4gtuKK5eaNF3EXuGURL/VDeSedntohuBUzD W80kEIzq76kGHfjejFNU6b51UNNoDGvzNVrSgUJ+g3rwim7Y3wIRECJS9WZU9IjGKg48 WQVFdLBteO2xU9m18TdNt020usFzjCsCdetqGTQQl+/FL7n0IkvJVJ9bnDD9RWiOs+aK NMwPNnZBqljaO4neFXC4v45h//JSD/IyFNjue6R+GlQglib5zytDV/ckydfu08+8HvOm EX9Q== 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; bh=24/50gawPTlFPF7aEaGnMfh/nLzuwWHmvSfF4l9MC/Y=; b=BiB48hY3FwyHpcZJrukLY0PbzNDFVZiUcL91SQp+jGhiwhAYKkCmCajBiAFlCvDdZp LMO4b4378YiDs4Hid6W+WihS3ZOobkbQwiNWf3NtAf8K90I7DM9tZ37LfAzQbiTZ0tPP 48iy6lgjVYjP9wN3c3OboWHq3d4MtWP5q7IK5YN+iGx46+sfQ+7eq1xQguKqDi3jG0jS eok0zkvPO9u2OZalZrp/a2+U+8dYp0hHWc/l65+eeOnyMLdBLTC4+52QauS+Frpv7ZWN yxB/ia/aBO4XpXz2iBeTDRj3fCpeJdgvRQfoHWqzs3Phl6mJORaqqp/dIJ+AbAAFvqZL R4RA== ARC-Authentication-Results: i=1; mx.google.com; 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 l70-20020a639149000000b0050300b91457si507997pge.683.2023.03.13.15.01.02; Mon, 13 Mar 2023 15:01:18 -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; 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 S229953AbjCMVwn (ORCPT + 99 others); Mon, 13 Mar 2023 17:52:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbjCMVwl (ORCPT ); Mon, 13 Mar 2023 17:52:41 -0400 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF7E88B05E for ; Mon, 13 Mar 2023 14:52:39 -0700 (PDT) Received: from localhost.localdomain ([185.117.37.92]) by smtp.orange.fr with ESMTPA id bq5ppwjxtFvkEbq5pp0ucl; Mon, 13 Mar 2023 22:52:37 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 13 Mar 2023 22:52:37 +0100 X-ME-IP: 185.117.37.92 From: Christophe JAILLET To: vkoul@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] dmaengine: imx-dma: Remove a redundant memset() call Date: Mon, 13 Mar 2023 22:52:31 +0100 Message-Id: <95a81d623bffde2e5d14e22fad7e8c9a9a7203f6.1678743528.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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?1760291590240477000?= X-GMAIL-MSGID: =?utf-8?q?1760291590240477000?= The desc->desc structure is already zeroed when 'desc' is kzalloc()'ed. There is no need to clear it twice. Remove the redundant memset(). Signed-off-by: Christophe JAILLET --- drivers/dma/imx-dma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 3bffe3ecbd1b..ee864128334a 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -750,7 +750,6 @@ static int imxdma_alloc_chan_resources(struct dma_chan *chan) desc = kzalloc(sizeof(*desc), GFP_KERNEL); if (!desc) break; - memset(&desc->desc, 0, sizeof(struct dma_async_tx_descriptor)); dma_async_tx_descriptor_init(&desc->desc, chan); desc->desc.tx_submit = imxdma_tx_submit; /* txd.flags will be overwritten in prep funcs */