From patchwork Mon Jan 11 14:54:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010889 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 CB699C43381 for ; Mon, 11 Jan 2021 14:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A163C225AC for ; Mon, 11 Jan 2021 14:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728354AbhAKOzr (ORCPT ); Mon, 11 Jan 2021 09:55:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732320AbhAKOz3 (ORCPT ); Mon, 11 Jan 2021 09:55:29 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E571C06179F for ; Mon, 11 Jan 2021 06:54:49 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id g185so126810wmf.3 for ; Mon, 11 Jan 2021 06:54:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/b1R3+bsCNv0D8QaTlCdd9Cg/ZmadyVtn3+pLwATEWc=; b=Ah7J8LN0jlZEL24PLX4WG1e3DiCnqHEN630ZaqiqvWw7XaQh60RtZO84LDEJd95g0B rC6J9lvBFXnqZ7OKBlfmteclgVykEj1nnnmX3gJCXPNSLiho6s5c78EY5a/TayLTL5QX IPVa1mzpBmZN3LPedZiYIMxOtyAwskSZD+WAQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/b1R3+bsCNv0D8QaTlCdd9Cg/ZmadyVtn3+pLwATEWc=; b=VH3g0w34EPPOhLAdeiGRBBNlrVfysQl/Alu9BgLqdHIkVTRHMGI7UK9FlnY0HCof8K E0ByjEoO+W+7DBM4bTQHFRgSVwfGvxyuJIjdvqXtZzzb4KmEIFE08s2LBCeyLTyLIVrS UAx14AeES2ZQc4KyWKnnx7CVKcAqzDdps6ouyxBkkvBfPG/l3qz617UDIoiCksGWgje5 c4fho+i7vUFSvniDRMs6W/fEKt45svbHdShoWwmd9gmu/vZ9X2bT+xQ8RXkrIOETCfYU 2P5I4at/IOSiaUsALBdE5QJQzrieVyV0OfXmOPbjftAi/9b+6HuZZEScAr7sz8gjFDai /OaA== X-Gm-Message-State: AOAM530jfqgnQbKDzxBKxEGAcbyqhjjeYjMvCQOQbATu573dueUF3YVe JGVa+HffhPKldcqsbTUaDGPiSMhh/IgUdW76xSY= X-Google-Smtp-Source: ABdhPJziuRVwPLalrG6E3rAJ9OUpO6HGQxNVSLmpi4fw6EyNHSq6p9HhJ2/VSjm/bGnZlEOIu0rw2A== X-Received: by 2002:a7b:c198:: with SMTP id y24mr61099wmi.151.1610376888199; Mon, 11 Jan 2021 06:54:48 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:47 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Sakari Ailus Subject: [PATCH] media: staging/intel-ipu3 : Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:37 +0100 Message-Id: <20210111145445.28854-2-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Sakari Ailus Signed-off-by: Ricardo Ribalda --- drivers/staging/media/ipu3/ipu3-v4l2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index 4dc8d9165f63..60aa02eb7d2a 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -773,9 +773,6 @@ static int imgu_try_fmt(struct file *file, void *fh, struct v4l2_format *f) pixm->pixelformat = fmt->fourcc; - memset(pixm->plane_fmt[0].reserved, 0, - sizeof(pixm->plane_fmt[0].reserved)); - return 0; } From patchwork Mon Jan 11 14:54:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010899 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 005E1C43331 for ; Mon, 11 Jan 2021 14:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D62D0229CA for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388441AbhAKO4K (ORCPT ); Mon, 11 Jan 2021 09:56:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730163AbhAKO4J (ORCPT ); Mon, 11 Jan 2021 09:56:09 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 839E7C0617A3 for ; Mon, 11 Jan 2021 06:54:50 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id v14so109571wml.1 for ; Mon, 11 Jan 2021 06:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gqQD8/80d4lI7bJ5BkF04XGNAqEe6coGxChG+Im6UdQ=; b=MU+JTSjlB5pP8MpoRRx6svcjs01UzZUhf+aMlFi01hgpEEu6Sxpjj5nM9Izn+lc9T3 n0mgHNXqxMFFrwUAm+LXFjHV2pcagP4DqlWw53F9n5vueQzIqsGLJbs4zW8ASWGEBs6E NEXrC4+uYE63KVWhsd6KDQZdZaFNPqmyJGJ3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gqQD8/80d4lI7bJ5BkF04XGNAqEe6coGxChG+Im6UdQ=; b=j69tetD5T/VW0SVgk3Dcx9eE6FPED/GCX418eoR9lJgr9DYuKt6zUsca/QW2Lqh0vb aOK8wgZjydAG7jR1244Oe3xpv1WwEYfHOycgdzBkaoKEvx2hwCp5U9lR8GuQoVPbwe8s GtmSUM8NOHzWMOcMICSOsxgWt/TsTLTo5IIE4Z6TD3rfa+tPNy4nQ6oxHclROIHi3ruC jP0tQtg28XsY2ZPCsQGRgY+NhrQlwfSeS7dCJEX88007UISZ0YtkCSqeMRMr0W9ODN8G CR2KEnsuwEDHywc1olxzJVJU2m/vKV18N8c1Ws8PD8eOFdWkGLfdeQ/pAAJq2fizPCCE AyWA== X-Gm-Message-State: AOAM5304d8knQKsDCecZqDmLg21/RJrqIXAIw5F8dvc2hQJ28D55Ep9g vqSeiiN/ZAu+IsPghi9pbCoi+KOfhXz1JL6r8/M= X-Google-Smtp-Source: ABdhPJy1Fi5TqRnSQ/AhkZQG5j5NkOX2yRSDqdpuHp2wRpoEfTueibevUrLphrS28hBfrmaaCgr60w== X-Received: by 2002:a05:600c:22c6:: with SMTP id 6mr77729wmg.33.1610376889181; Mon, 11 Jan 2021 06:54:49 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:48 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Matthias Brugger Subject: [PATCH 2/9] media: mtk-mdp: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:38 +0100 Message-Id: <20210111145445.28854-3-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Matthias Brugger Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c b/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c index 724c7333b6e5..ace4528cdc5e 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c @@ -199,7 +199,6 @@ static const struct mtk_mdp_fmt *mtk_mdp_try_fmt_mplane(struct mtk_mdp_ctx *ctx, pix_mp->ycbcr_enc = ctx->ycbcr_enc; pix_mp->quantization = ctx->quant; } - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved)); max_w = variant->pix_max->target_rot_dis_w; max_h = variant->pix_max->target_rot_dis_h; @@ -247,8 +246,6 @@ static const struct mtk_mdp_fmt *mtk_mdp_try_fmt_mplane(struct mtk_mdp_ctx *ctx, pix_mp->plane_fmt[i].bytesperline = bpl; if (pix_mp->plane_fmt[i].sizeimage < sizeimage) pix_mp->plane_fmt[i].sizeimage = sizeimage; - memset(pix_mp->plane_fmt[i].reserved, 0, - sizeof(pix_mp->plane_fmt[i].reserved)); mtk_mdp_dbg(2, "[%d] p%d, bpl:%d, sizeimage:%u (%u)", ctx->id, i, bpl, pix_mp->plane_fmt[i].sizeimage, sizeimage); } From patchwork Mon Jan 11 14:54:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010897 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 9D846C43381 for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81EA2225AC for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388756AbhAKO4K (ORCPT ); Mon, 11 Jan 2021 09:56:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730264AbhAKO4J (ORCPT ); Mon, 11 Jan 2021 09:56:09 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ED20C0617A5 for ; Mon, 11 Jan 2021 06:54:51 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id y23so138112wmi.1 for ; Mon, 11 Jan 2021 06:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QAsmUUEgKueJfUyE+PDxMx4ue7SmU3mq0cNtqhnnYsE=; b=cdKRerAvU1UPYuCV0vCuEM401EAsTCASkDnjlSRj1WBN57Ay7ruzDTalMK6YAH259i jNHa3Ywloylm9orbp/B59KbWqm+d+JrN+QB3raBMkVmxefG/Pf8KzPBSRKe8aicX/C3i vBLTwd6rdHknL3WZygJWlCDfMvLFEPQEqNZr8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QAsmUUEgKueJfUyE+PDxMx4ue7SmU3mq0cNtqhnnYsE=; b=lLIsOfSejvn9l9IknsVsNRsheSEhS8uxvDWUYtU6rP8PuJ1fUKexZ4fFePUVuUqS2h 8aa3Lf6MzGMx/YcTBUCqcrKne+AJtBkhuWRRopUN2tuk4ZYRsnwDp4BnMk/GUCBJbG/2 QwDq3O4/fBgl9r2gnwZUZxdZHlTEgZvH7RKU94A9c7q5B39h+orLl0K4G+FxxItf2hoY Bs8aSNd1o94aB4PNXZaGjFVONfYbgezFNzH6s7alWO79DGYHIJbIz4fy7E0dIpkcFp5x sFP2J38NqFnw822ToZbrD1Yg2qSLNvTUX1hZ0qb6cdNRsRcUAgP9zAPplseFJdtHFrBq loug== X-Gm-Message-State: AOAM531rqQ9Zc0VnQ27pxGHyd1o/qamNe56v3uFH4Aek9elvOiF0JjEM QPihFkkL3cipDpwrLvXoTEHgHL+dSTi6mURquH4= X-Google-Smtp-Source: ABdhPJyOYz9gxuEVRQRIvRU+Jl4KvAUI5AC5g0C3gmc/dNz+48JZjXBUIIcCzXiCCego+TORLUQbYg== X-Received: by 2002:a1c:6208:: with SMTP id w8mr103281wmb.96.1610376889935; Mon, 11 Jan 2021 06:54:49 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:49 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Matthias Brugger Subject: [PATCH 3/9] media: mtk-vcodec: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:39 +0100 Message-Id: <20210111145445.28854-4-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Matthias Brugger Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 5 ----- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 8 -------- 2 files changed, 13 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c index c768a587a944..d746c41ea805 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c @@ -715,12 +715,7 @@ static int vidioc_try_fmt(struct v4l2_format *f, } } - for (i = 0; i < pix_fmt_mp->num_planes; i++) - memset(&(pix_fmt_mp->plane_fmt[i].reserved[0]), 0x0, - sizeof(pix_fmt_mp->plane_fmt[0].reserved)); - pix_fmt_mp->flags = 0; - memset(&pix_fmt_mp->reserved, 0x0, sizeof(pix_fmt_mp->reserved)); return 0; } diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c index 21de1431cfcb..db1f62cc38b3 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c @@ -320,13 +320,7 @@ static int vidioc_try_fmt(struct v4l2_format *f, } } - for (i = 0; i < pix_fmt_mp->num_planes; i++) - memset(&(pix_fmt_mp->plane_fmt[i].reserved[0]), 0x0, - sizeof(pix_fmt_mp->plane_fmt[0].reserved)); - pix_fmt_mp->flags = 0; - memset(&pix_fmt_mp->reserved, 0x0, - sizeof(pix_fmt_mp->reserved)); return 0; } @@ -532,8 +526,6 @@ static int vidioc_venc_g_fmt(struct file *file, void *priv, for (i = 0; i < pix->num_planes; i++) { pix->plane_fmt[i].bytesperline = q_data->bytesperline[i]; pix->plane_fmt[i].sizeimage = q_data->sizeimage[i]; - memset(&(pix->plane_fmt[i].reserved[0]), 0x0, - sizeof(pix->plane_fmt[i].reserved)); } pix->flags = 0; From patchwork Mon Jan 11 14:54:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010903 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 EF17DC433DB for ; Mon, 11 Jan 2021 14:57:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B405F225AB for ; Mon, 11 Jan 2021 14:57:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388917AbhAKO4Z (ORCPT ); Mon, 11 Jan 2021 09:56:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732707AbhAKO4K (ORCPT ); Mon, 11 Jan 2021 09:56:10 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E480FC0617A9 for ; Mon, 11 Jan 2021 06:54:51 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id r4so112735wmh.5 for ; Mon, 11 Jan 2021 06:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UWRvQWUwrPFkkVqrFhhi1pQBAFyO41MacdjI236ZA30=; b=OTgGzZIicbYeBkzWjZCwM3d578bQk3fsxekMNukcoFlVgUkoDrnf4nL9eHp/WaDVnv X1PCE72h78cVbouMZF7wC21HOukqg9pvdDR9lUDXoR+nvux+9C8BgDF1yfMDUBj+RIzG 91FjnZkMHOdMlsOHiBidyoDvjJNiRwIII9UXA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UWRvQWUwrPFkkVqrFhhi1pQBAFyO41MacdjI236ZA30=; b=jbXPbj9AXu31jWLLIFSiZIMVZ6sRrdAn4b9GZPM6az4OPEq7Z2GgIt+BCD+NaH9Y+1 5TIaz8ijnOjKXAG3dVIUowvYYSH9VCQmpJ1Yh++7yv0LHArPLYvfxiN4Hr7DtdS5DYA/ G8DYTSbOcH7RRdvHN6QU8ZKtTbrkH+i2ORCUv2hQ/xVGEbmmzwxEy5pTdh/8lXh+msks nT9fqVhdbJUyLGBL/6p4U6gkK8E68LOprSEQPmCg4OivPb2kZUKTkAp3go6a01Qwzy7L Ltoqrn5eIYYeQotd2uGSAKtAdfLIJrvDiDkSHP8m1FdjIyiWfys+n1O/8DepmoVqnbFp p3EQ== X-Gm-Message-State: AOAM532KnCiKPL8p6NckS9K0m/Zp5rOST6tvL1ZHP4qu6lCT5/6Kt3f3 lHOSLD+S5TNin63TwqtCWxP+znsqeqsINRm5H5c= X-Google-Smtp-Source: ABdhPJwE2ruvXuJCF4cZk406wM4rQwSTfy3+m5nY6ft6trpPAMaR6TDPibnZpXYKE3gt83lwxA+HsA== X-Received: by 2002:a1c:dd07:: with SMTP id u7mr77572wmg.51.1610376890632; Mon, 11 Jan 2021 06:54:50 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:50 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , linux-renesas-soc@vger.kernel.org Subject: [PATCH 4/9] media: fdp1: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:40 +0100 Message-Id: <20210111145445.28854-5-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/platform/rcar_fdp1.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c index c9448de885b6..01c1fbb97bf6 100644 --- a/drivers/media/platform/rcar_fdp1.c +++ b/drivers/media/platform/rcar_fdp1.c @@ -1439,8 +1439,6 @@ static void fdp1_compute_stride(struct v4l2_pix_format_mplane *pix, pix->plane_fmt[i].sizeimage = pix->plane_fmt[i].bytesperline * pix->height / vsub; - memset(pix->plane_fmt[i].reserved, 0, - sizeof(pix->plane_fmt[i].reserved)); } if (fmt->num_planes == 3) { @@ -1448,8 +1446,6 @@ static void fdp1_compute_stride(struct v4l2_pix_format_mplane *pix, pix->plane_fmt[2].bytesperline = pix->plane_fmt[1].bytesperline; pix->plane_fmt[2].sizeimage = pix->plane_fmt[1].sizeimage; - memset(pix->plane_fmt[2].reserved, 0, - sizeof(pix->plane_fmt[2].reserved)); } } From patchwork Mon Jan 11 14:54:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010893 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 3DD0BC433E0 for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02562225AB for ; Mon, 11 Jan 2021 14:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388768AbhAKO4L (ORCPT ); Mon, 11 Jan 2021 09:56:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388754AbhAKO4K (ORCPT ); Mon, 11 Jan 2021 09:56:10 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D981C0617AB for ; Mon, 11 Jan 2021 06:54:52 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id g185so126969wmf.3 for ; Mon, 11 Jan 2021 06:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B//FbTYYBDBPWWUpSDBcLG5G7/7plbLQrylxtauexS0=; b=YsAKy+Fmriq36NNF1XTmPGoBWBzdjMbEOnveFTJ+tNOCDMIbMIEIB3i6T/fOB3cIVB nPdzEgoBAOvpxLg9fp+dG5GtfSa6aszSiWxMME7DXUh3x7vMiJy9xMiromZgRP3oD6lJ DZVFMmIm9sxoVsTuAL/Xb3uM437r/cVJdD5MY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B//FbTYYBDBPWWUpSDBcLG5G7/7plbLQrylxtauexS0=; b=aG2swmi2ruNmX0GnyslWlc+S27sQZO+L1+j0+0jC3dN4XG5q7fxlJA1p+zyDHrHGrE JSlrnIwEC7N4Ro8z1N8J+E20TGqqDsej1Fyn7/pki3idQfw89vK+TH/o2dGrFJ+14vOz rzuMBuOsCinChHtvWiKzxfqiFKutHopK/Psl6wazMXSFKan9T72MKpYoB9c2xd9jrs19 +KN/PDIDD0ZdrIexiQ5DKAFAPFvsTBY0DCPVgrKJVoa9KZYte2DmVIzXYIDYLc1CDG+6 fHlTm9q5G55NxQxRXPioeTtKZq9kwWr0Q7vSiuzQuyjfgQxdFSF/EWiE0iQhBicWW0D+ bolg== X-Gm-Message-State: AOAM532zolRofGj0wSfxBWirp/FHeOlO5cOXjUUXJdGAoPWqtWDVwlHF IMN5BKocWdUF2zF1U4PIR1SX6/DlOSk6y5ZET98= X-Google-Smtp-Source: ABdhPJx1gBQziw3Izae5TOKXG7hu2VrHquyG0M+MDY9Q5kjlfU6V/0mmff31UMqfau3WJe6BBw5VTw== X-Received: by 2002:a7b:cf08:: with SMTP id l8mr49146wmg.189.1610376891362; Mon, 11 Jan 2021 06:54:51 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:50 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Mikhail Ulyanov Subject: [PATCH 5/9] media: jpu: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:41 +0100 Message-Id: <20210111145445.28854-6-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Mikhail Ulyanov Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/platform/rcar_jpu.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c index 9b99ff368698..2bddc957cb87 100644 --- a/drivers/media/platform/rcar_jpu.c +++ b/drivers/media/platform/rcar_jpu.c @@ -793,7 +793,6 @@ static int __jpu_try_fmt(struct jpu_ctx *ctx, struct jpu_fmt **fmtinfo, pix->colorspace = fmt->colorspace; pix->field = V4L2_FIELD_NONE; pix->num_planes = fmt->num_planes; - memset(pix->reserved, 0, sizeof(pix->reserved)); jpu_bound_align_image(&pix->width, JPU_WIDTH_MIN, JPU_WIDTH_MAX, fmt->h_align, &pix->height, JPU_HEIGHT_MIN, @@ -808,8 +807,6 @@ static int __jpu_try_fmt(struct jpu_ctx *ctx, struct jpu_fmt **fmtinfo, pix->plane_fmt[0].sizeimage = JPU_JPEG_HDR_SIZE + (JPU_JPEG_MAX_BYTES_PER_PIXEL * w * h); pix->plane_fmt[0].bytesperline = 0; - memset(pix->plane_fmt[0].reserved, 0, - sizeof(pix->plane_fmt[0].reserved)); } else { unsigned int i, bpl = 0; @@ -822,8 +819,6 @@ static int __jpu_try_fmt(struct jpu_ctx *ctx, struct jpu_fmt **fmtinfo, for (i = 0; i < pix->num_planes; ++i) { pix->plane_fmt[i].bytesperline = bpl; pix->plane_fmt[i].sizeimage = bpl * h * fmt->bpp[i] / 8; - memset(pix->plane_fmt[i].reserved, 0, - sizeof(pix->plane_fmt[i].reserved)); } } From patchwork Mon Jan 11 14:54:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010895 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 95693C433E9 for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 638B5225AB for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388840AbhAKO4O (ORCPT ); Mon, 11 Jan 2021 09:56:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388765AbhAKO4L (ORCPT ); Mon, 11 Jan 2021 09:56:11 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C08EDC0617B1 for ; Mon, 11 Jan 2021 06:54:53 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id y23so138253wmi.1 for ; Mon, 11 Jan 2021 06:54:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tHVsXtMiml7BeUACbg86G/7vdz6mKeSHlUF/QzTEklQ=; b=PjacKNZyR9RFcS0iQu+Egy58/Z7nGvb6hhfgUK+kQS5UMnzrHYRMUOnYVugTHpc7Th FeravoD05+QzRJWlYcN6OnTln5sA9ICkj+zt3vx51CbVMva+sOZww8KduJjHtmRjurNR 3T7CK9q5k80kTAbXAdr73jwTjJLJ1q+owFUSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tHVsXtMiml7BeUACbg86G/7vdz6mKeSHlUF/QzTEklQ=; b=Ns2Pkdm4lSJmSMBwlvigmU7eOm/9jYBLTBN4htoCelixtqZmymQg+lcQAwXadcG+U9 c1H6ELK4ErnY/E9/qqBXMA0NIVUzBTz5ZwRmiOTVn+601MpQ0czAj27JIbNMgwjD5zKG VPXbqfs1mLgDboGwsC4e21ktQT3b47/TNdIZoFqzAkiEoQ1ScOMy3KHIx3sJKE7ESHd2 6vklwmb+W5gmyYcyN99KD17HUHToWBxWzBfSEqN9uIhQb8kwVZm2N+gAERiIEfY+cpZA 6rVq/WFH00ashnO+zY2PfnHtca3NLeTq+W7Vc701EBvI1iY1Ef5GvOYgS3vSwkHKrigC zWFg== X-Gm-Message-State: AOAM533zUC/z7h0BkOl0WWY9bMaPH+0Ln3/UjEMuzwoCh6+IVQQK1F/r I7/c2VUmnfsGgBAvejrMT1x9iLvKibYROGp1/Xo= X-Google-Smtp-Source: ABdhPJy2Yqvv8vnAD8dsW6R5NcyWQfQF8aj87/xcEKNPdZNNNWa/JIH6DHJ9w4F0tgSqAKBzOqBPbQ== X-Received: by 2002:a05:600c:2117:: with SMTP id u23mr53230wml.153.1610376892464; Mon, 11 Jan 2021 06:54:52 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:51 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH 6/9] media: sum4i-csi: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:42 +0100 Message-Id: <20210111145445.28854-7-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c index 1a2f65d83a6c..4785faddf630 100644 --- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c +++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c @@ -113,8 +113,6 @@ static void _sun4i_csi_try_fmt(struct sun4i_csi *csi, pix->num_planes = _fmt->num_planes; pix->pixelformat = _fmt->fourcc; - memset(pix->reserved, 0, sizeof(pix->reserved)); - /* Align the width and height on the subsampling */ width = ALIGN(pix->width, _fmt->hsub); height = ALIGN(pix->height, _fmt->vsub); @@ -131,8 +129,6 @@ static void _sun4i_csi_try_fmt(struct sun4i_csi *csi, bpl = pix->width / hsub * _fmt->bpp[i] / 8; pix->plane_fmt[i].bytesperline = bpl; pix->plane_fmt[i].sizeimage = bpl * pix->height / vsub; - memset(pix->plane_fmt[i].reserved, 0, - sizeof(pix->plane_fmt[i].reserved)); } } From patchwork Mon Jan 11 14:54:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010907 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 20CF2C43332 for ; Mon, 11 Jan 2021 14:57:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECB6822795 for ; Mon, 11 Jan 2021 14:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388995AbhAKO4u (ORCPT ); Mon, 11 Jan 2021 09:56:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388988AbhAKO4t (ORCPT ); Mon, 11 Jan 2021 09:56:49 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAFA7C0617BA for ; Mon, 11 Jan 2021 06:54:54 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id i9so77037wrc.4 for ; Mon, 11 Jan 2021 06:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AKDGtEhnWmTb9KoPsyE100Se2qlDDTUKP3nh7yfrkBU=; b=OHMp+Ph86NCVy/5ERoXGHpgH2qS4x1jwqS1yL1ndgmhTMKDgBw+e/O0mXROCcpzZod q5umr1B+4ebVj2wHwmNVEak4gLHItRDEZTHBXxNhncWwrYfDfp2qAcRqmofJZ/EMFeGE A70DCWtLLIHmXtPnTHxiH/DSzUiINNJKXac6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AKDGtEhnWmTb9KoPsyE100Se2qlDDTUKP3nh7yfrkBU=; b=scPRYVcc/+886T+T+Lj56pf/hMDa79dd7Hz2LLAe9YEUUNvAcTBietaLAl2EdsSPd9 Jkplls75DypQ35nY2haDsIBXdqHfGJu2j6SLmH8fbTk2oLwW3iAVY2Y3W1NlN8ZWaANe jmh2QR0zIgqfvkEnlf3WGMYrRJ9Hy5ei2JGvb+G8uVoLdqtf0FIo+vafUQEiX6pyU/qv R/LtRivDjBo4y8Ow1EOy8BdhNZjLIquTJyEdNM8Zwt/PuvfuTcM8Nt+xbqy5V33nTgoN 3+8I5C2dJ+bZrWDESt3a1fwNAqGL/9XPfQ9eouZhUV2xAXW564D2ct8vV2+g5rhJwBN/ 1jwg== X-Gm-Message-State: AOAM533ucVY4A8ipOYONPJAXiDTxi+W30r1K1vjgMKCZZzIV2A49Vl01 N3ea8uDrnBEf3ly2cOgsny/Kj0BxCCqs5S3sinE= X-Google-Smtp-Source: ABdhPJxT0Csqs/mc1iqDf/uhP704k+gxCV0QI5PXpgOD1Qq7P8Lo8ufCLaRURRwSfd/gn/yiO9M/1A== X-Received: by 2002:a5d:4641:: with SMTP id j1mr16915584wrs.94.1610376893432; Mon, 11 Jan 2021 06:54:53 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:52 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Benoit Parrot Subject: [PATCH 7/9] media: ti-vpe: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:43 +0100 Message-Id: <20210111145445.28854-8-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Benoit Parrot Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/platform/ti-vpe/vpe.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 779dd74b82d0..10251b787674 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -1683,7 +1683,6 @@ static int __vpe_try_fmt(struct vpe_ctx *ctx, struct v4l2_format *f, } } - memset(pix->reserved, 0, sizeof(pix->reserved)); for (i = 0; i < pix->num_planes; i++) { plane_fmt = &pix->plane_fmt[i]; depth = fmt->vpdma_fmt[i]->depth; @@ -1713,7 +1712,6 @@ static int __vpe_try_fmt(struct vpe_ctx *ctx, struct v4l2_format *f, plane_fmt->bytesperline * depth) >> 3; } - memset(plane_fmt->reserved, 0, sizeof(plane_fmt->reserved)); } return 0; From patchwork Mon Jan 11 14:54:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010901 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 31B18C43332 for ; Mon, 11 Jan 2021 14:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2FBE22BED for ; Mon, 11 Jan 2021 14:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388925AbhAKO4Z (ORCPT ); Mon, 11 Jan 2021 09:56:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388193AbhAKO4Y (ORCPT ); Mon, 11 Jan 2021 09:56:24 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3D6BC0617BC for ; Mon, 11 Jan 2021 06:54:55 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id y17so33843wrr.10 for ; Mon, 11 Jan 2021 06:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9se+I1bVzSGFCzzbJS6Ist8AUI7EMxjL64J/1ddQygI=; b=YLFfNfVRAiYcTgmFLqoE4Z2bi6XlMhIBpMNAqdYu6XuTMrxs+zUeA8yu6QvFDvbq5Q HgpRpM2dzP6LmN51VRglBL02zKxlk4aug1qomnCucJPSx55JtKLWPUcJwrU2QjM19azG RNv5F+ZXqB7Ibf1DM1HnRBmhP4cFr+vLxR2kg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9se+I1bVzSGFCzzbJS6Ist8AUI7EMxjL64J/1ddQygI=; b=Ad6H+2pQb7FEJle7Iko0EfFbUuWQzjkMPQ/8CyzPy2sIx1AI7A7MyVjrm1lyUzL+sa UouN7Hidi4bOlkstifFKYkyCGky4x9H5nontvYC1vjzEYNpg1MgBzJ2AYAbDMwyfGwci KKqwL8J3po/yML+Jserbr2QqDQZvXE2gSSrkEKDMGzqyCtZOVme2zy5vE9SsTcQFw/hA 43BNLp33PihXUWyQusa6cgMyllSCUjaA0uzZTgvcfHxgrkrMIHghU/vlbS8RGpUkJSa3 v1hvJaeqswiLItcOL1ixFp0wT5LcdGbCewPhFqpAY81fOCrk46FgskeVlWpdsHVf2W4v iO/w== X-Gm-Message-State: AOAM5309GGB+gEoyL+7BwRV2+6QPNBpK5nulrykWY7QUuftcSSMCgk3D KHMS5+se69chOfZMIqi8g8LOsCDIAZQyNzdOSHA= X-Google-Smtp-Source: ABdhPJxv0uiMEc/jhqGHhh8MDEbEfj102n1CwEduAjkekeUDQX1NRZBtE6Zh7N6snMPxf6T0lO00Qg== X-Received: by 2002:a05:6000:1d1:: with SMTP id t17mr17198876wrx.164.1610376894533; Mon, 11 Jan 2021 06:54:54 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:53 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Hans Verkuil Subject: [PATCH 8/9] media: vicodec: Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:44 +0100 Message-Id: <20210111145445.28854-9-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Hans Verkuil Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/media/test-drivers/vicodec/vicodec-core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c index 025f3ff77302..33f1c893c1b6 100644 --- a/drivers/media/test-drivers/vicodec/vicodec-core.c +++ b/drivers/media/test-drivers/vicodec/vicodec-core.c @@ -811,9 +811,6 @@ static int vidioc_g_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f) pix_mp->xfer_func = ctx->state.xfer_func; pix_mp->ycbcr_enc = ctx->state.ycbcr_enc; pix_mp->quantization = ctx->state.quantization; - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved)); - memset(pix_mp->plane_fmt[0].reserved, 0, - sizeof(pix_mp->plane_fmt[0].reserved)); break; default: return -EINVAL; @@ -886,8 +883,6 @@ static int vidioc_try_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f) info->sizeimage_mult / info->sizeimage_div; if (pix_mp->pixelformat == V4L2_PIX_FMT_FWHT) plane->sizeimage += sizeof(struct fwht_cframe_hdr); - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved)); - memset(plane->reserved, 0, sizeof(plane->reserved)); break; default: return -EINVAL; From patchwork Mon Jan 11 14:54:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12010905 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 AD413C4332E for ; Mon, 11 Jan 2021 14:57:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D2DF225AC for ; Mon, 11 Jan 2021 14:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388999AbhAKO4v (ORCPT ); Mon, 11 Jan 2021 09:56:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388989AbhAKO4u (ORCPT ); Mon, 11 Jan 2021 09:56:50 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2D1DC0617BE for ; Mon, 11 Jan 2021 06:54:56 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id y23so138403wmi.1 for ; Mon, 11 Jan 2021 06:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/b1R3+bsCNv0D8QaTlCdd9Cg/ZmadyVtn3+pLwATEWc=; b=BgqVoKW4QdiYG5eo2hFu8iLAYEc9Su6ehfP+Qfrn734ZdeB4n1YpXusioR43fxVE6x MDlazEmtmLs9cYMZDo/Bxg/JWuCqxOsFtam+t+4ozRjDcCwNloPzo0fxMkWVNBN5gMTm DPN0KChZepN8Q+K1fcQnbhDv8yVNmmWCzjxK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/b1R3+bsCNv0D8QaTlCdd9Cg/ZmadyVtn3+pLwATEWc=; b=laUxA7rf8Ia4oFX5BY+GL5tRUiNFIkwG7puFL0CcqyOQTGdMFGdjhD2yJlprfDUwcm wO72aBLzz6ehAROLk8mNGwXv6aDr7HPXC3rZWUw8IksB/ba9Svs+kGI0P8sesBUD+0ty 2G9eM1wmrm/2JcgQyTJLdCAtq5uIThal+oXBXp0FF+BqUd0VanUOoGrlhcff2JuxefCg /2JeQY5AgGV9Fr1OZN4Sw4hTMlUiqy23fU6M2SHSDRlllzNAZROPsI4Ssmq8Z87DFReG uxRnGHuJjX35K+8bDcGYVrYUrWEKHLxXohmITIHxzwMEGKCh7shN0gyJuuEHOz/BpItU qt4Q== X-Gm-Message-State: AOAM532RG1jIcVpwhRWoc5Xifabwtvw0G/O5mxLs/7yYrlA4BXTltTSs b8AyZEK1m2dngJQmgPMF+fpWdxMkxKk01SaoIDA= X-Google-Smtp-Source: ABdhPJxXBbZDp32ue8DMiN01TCHjLl2uLezF/LHBLHHQCJLa7oRe6M0nKZhGX3mlT2bbrv8a9hA4wA== X-Received: by 2002:a1c:bd09:: with SMTP id n9mr115116wmf.32.1610376895456; Mon, 11 Jan 2021 06:54:55 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id s133sm17780wmf.38.2021.01.11.06.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:54:55 -0800 (PST) From: Ricardo Ribalda To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda , Sakari Ailus Subject: [PATCH 9/9] media: staging/intel-ipu3 : Do not zero reserved fields Date: Mon, 11 Jan 2021 15:54:45 +0100 Message-Id: <20210111145445.28854-10-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210111145445.28854-1-ribalda@chromium.org> References: <20210111145445.28854-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Core code already clears reserved fields of struct v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Cc: Sakari Ailus Signed-off-by: Ricardo Ribalda Reviewed-by: Kieran Bingham --- drivers/staging/media/ipu3/ipu3-v4l2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index 4dc8d9165f63..60aa02eb7d2a 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -773,9 +773,6 @@ static int imgu_try_fmt(struct file *file, void *fh, struct v4l2_format *f) pixm->pixelformat = fmt->fourcc; - memset(pixm->plane_fmt[0].reserved, 0, - sizeof(pixm->plane_fmt[0].reserved)); - return 0; }