Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1132156imw; Fri, 15 Jul 2022 22:24:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vvOBTR3Lxy5v5buOFSpzy4Z+vzfkTVE7u6JElP/mToPIeeswmEc30UBrKC79DV6JZx83j+ X-Received: by 2002:a17:903:32c1:b0:16c:35b2:18c3 with SMTP id i1-20020a17090332c100b0016c35b218c3mr17091292plr.126.1657949096532; Fri, 15 Jul 2022 22:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657949096; cv=none; d=google.com; s=arc-20160816; b=SYTJFEG0WKNvEu74MT1EOVeRLFNAaaNmQqAHgcBzAOgbRxTNyXykEUEKmJw9bdII38 LrUU3NzQoC5bS5VC/f6qQUcPCgIkEE0V1l4awfncBeenMsNiRgVttoAghfEdFeR9/QC1 u6wN9dhE9/UuVXHBDCiBeeaEmj6DCGoyTyeV71yTVcYsmHYKkgKMq5NFUj2590AzBbN1 2TJgmqIPYlWhgIES142yrWwkJF6TxPWJGcFeqFPleta67obat29wzm9BkFzHwbaZ10Vx +vLnNKJO7x1mdXzcMc9QsK18O2QdzlhgHHBNABn5nQTcsmoUrXWjyMRNFd5iUyoQwSl9 a6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=U90S/JcpULy52vtUCbLJ+naW9W+CZoprzXT+5ueoG9g=; b=Q1oCB7SBf1CynqcTNemxp5RfNb6fCEbgwiXr85IE+Bo9gCH3R5x2ovQXhKL1HI5rBE YDffbSRjNZiKIMhoEbBOQhZnXMW2RX8mixdDael4W7ulHqY1ZcByqmYjrU5jItcZ/QX3 4rhjVBGWJDQbbzEWmORk+99i9sFd/4L6nwcdiQ+FJtbBVQzeuX5xKrzw/8Eel1GBLhxU KyeiNKzfH2fFPGyup0yCHcbWUOvafUwrBRQNtT+6CfHBVgeM2Fyjm2pOPGG4eBoH2ZOV H415cRl8eX+bN6lC9o2NG0K1A2bVOfoBo2aGlxtKezBu4NOMQZtCHOQHBq9wTA6GbUCb QejA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a631309000000b0041603075b9asi7569390pgl.309.2022.07.15.22.24.40; Fri, 15 Jul 2022 22:24:56 -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 S229772AbiGPFAn (ORCPT + 99 others); Sat, 16 Jul 2022 01:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiGPFAl (ORCPT ); Sat, 16 Jul 2022 01:00:41 -0400 Received: from smtpbg.qq.com (biz-43-154-54-12.mail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 026A440BD6; Fri, 15 Jul 2022 22:00:34 -0700 (PDT) X-QQ-mid: bizesmtp65t1657947577tegsdf7s Received: from localhost.localdomain ( [223.86.65.215]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 16 Jul 2022 12:59:35 +0800 (CST) X-QQ-SSF: 01000000002000E0U000B00A0000000 X-QQ-FEAT: PXJK6C+SdL1zWBD2r1dwXVWoJNFGSxML4kNGB47Zd/vMvHzldRq1HCJXarKEW UmWtuorVig3z4d2+/wTKtMKvNj38eVh7uKRzSWxxWhIN8pdJWXVvs95rwhrkFbkxdUceivp GctfELb/61rM6FwAyZrxhnLps69L7fqO2d4oD7jY+b0d6J2/O1bHhx5lN9rum4kXrM4B5ql ABb33lz1HSobucNDQQ4FsrHKBz3qjC76kpOoq6vQbWn0Hyh1aYuItGEyJIwV8C7bg0NsviS hcqT4ij0mMYVC2/HmQLga0fL2/gRk2PNkqD7D+AJo6BJvAp8YxGR9vEq83pOxDbTuPxVNn6 GwigwVMdnYYW6xBQnAAfHJh22aF0g== X-QQ-GoodBg: 0 From: Jason Wang To: mchehab@kernel.org Cc: mirela.rabulea@nxp.com, shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jason Wang Subject: [PATCH] media: imx-jpeg: Remove unnecessary memset() after dma_alloc_coherent() Date: Sat, 16 Jul 2022 20:25:43 +0800 Message-Id: <20220716122543.34218-1-wangborong@cdjrlc.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:cdjrlc.com:qybglogicsvr:qybglogicsvr6 X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, RDNS_DYNAMIC,SPF_PASS,T_SPF_HELO_TEMPERROR autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 The `dma_alloc_coherent()' already zeroes out memory for us, so we don't need the redundant memset(). Signed-off-by: Jason Wang --- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c index 32fd04a3d8bb..482177ee01b6 100644 --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c @@ -519,7 +519,6 @@ static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg, GFP_ATOMIC); if (!cfg_stm) goto err; - memset(cfg_stm, 0, MXC_JPEG_MAX_CFG_STREAM); jpeg->slot_data[slot].cfg_stream_vaddr = cfg_stm; skip_alloc: -- 2.35.1