From patchwork Sat Jul 16 12:25:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 591238 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 18942C433EF for ; Sat, 16 Jul 2022 05:00:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbiGPFAm (ORCPT ); Sat, 16 Jul 2022 01:00:42 -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 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:cdjrlc.com:qybglogicsvr:qybglogicsvr6 Precedence: bulk List-ID: X-Mailing-List: linux-media@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: