From patchwork Thu Jun 4 07:26:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xia Jiang X-Patchwork-Id: 209633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3811EC433E1 for ; Thu, 4 Jun 2020 07:30:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 146172075B for ; Thu, 4 Jun 2020 07:30:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="IId0EvSD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728321AbgFDHav (ORCPT ); Thu, 4 Jun 2020 03:30:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:28869 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728088AbgFDH3e (ORCPT ); Thu, 4 Jun 2020 03:29:34 -0400 X-UUID: 6cd257d7c5674d7696e431c5c2fc8ef7-20200604 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=pwxgK1X1XdIdmyvhCdOXj7GI0xWZ4kTcpeu8OdlT4i0=; b=IId0EvSD7jg837JzzGKXBe1embw/r6JMJTdklDLq5HLMRP1yUGNLhKRJQ5UdyNhs6/0TiBJKo465v0rAgpYsyIERh2w6LTGE5myALwmYb2w+JZwoJBGSWQoT/IZiiWmpr7sqbhpqyIbhcvTfLaIAble/UatIRtkCsyCguu/CNNU=; X-UUID: 6cd257d7c5674d7696e431c5c2fc8ef7-20200604 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 677953915; Thu, 04 Jun 2020 15:29:27 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Jun 2020 15:29:24 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 4 Jun 2020 15:29:23 +0800 From: Xia Jiang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Rick Chang CC: , , , , , Marek Szyprowski , Tomasz Figa , , , , , , , Xia Jiang Subject: [PATCH v9 09/18] media: platform: Delete zeroing the reserved fields Date: Thu, 4 Jun 2020 15:26:59 +0800 Message-ID: <20200604072708.9468-10-xia.jiang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200604072708.9468-1-xia.jiang@mediatek.com> References: <20200604072708.9468-1-xia.jiang@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Delete zeroing the reserved fields because that the core already does it. Signed-off-by: Xia Jiang --- v9: new patch --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.18.0 diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index bb4ebce881ee..bd1cc58324c6 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -198,7 +198,6 @@ static int mtk_jpeg_try_fmt_mplane(struct v4l2_format *f, struct mtk_jpeg_dev *jpeg = ctx->jpeg; int i; - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved)); pix_mp->field = V4L2_FIELD_NONE; if (ctx->state != MTK_JPEG_INIT) { @@ -217,7 +216,6 @@ static int mtk_jpeg_try_fmt_mplane(struct v4l2_format *f, &pix_mp->height, MTK_JPEG_MIN_HEIGHT, MTK_JPEG_MAX_HEIGHT, 0); - memset(pfmt->reserved, 0, sizeof(pfmt->reserved)); pfmt->bytesperline = 0; /* Source size must be aligned to 128 */ pfmt->sizeimage = mtk_jpeg_align(pfmt->sizeimage, 128); @@ -237,7 +235,6 @@ static int mtk_jpeg_try_fmt_mplane(struct v4l2_format *f, u32 stride = pix_mp->width * fmt->h_sample[i] / 4; u32 h = pix_mp->height * fmt->v_sample[i] / 4; - memset(pfmt->reserved, 0, sizeof(pfmt->reserved)); pfmt->bytesperline = stride; pfmt->sizeimage = stride * h; } @@ -270,7 +267,6 @@ static int mtk_jpeg_g_fmt_vid_mplane(struct file *file, void *priv, q_data = mtk_jpeg_get_q_data(ctx, f->type); - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved)); pix_mp->width = q_data->w; pix_mp->height = q_data->h; pix_mp->field = V4L2_FIELD_NONE; @@ -294,7 +290,6 @@ static int mtk_jpeg_g_fmt_vid_mplane(struct file *file, void *priv, pfmt->bytesperline = q_data->bytesperline[i]; pfmt->sizeimage = q_data->sizeimage[i]; - memset(pfmt->reserved, 0, sizeof(pfmt->reserved)); v4l2_dbg(1, debug, &jpeg->v4l2_dev, "plane[%d] bpl=%u, size=%u\n",