Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4357216pxb; Thu, 14 Oct 2021 03:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+rQ71+iWMvIh7Zk96EzRVzvqA3SFRvQsmnfy4OpX2C5YvtyT44MmAr+AByYhQoYY2y598 X-Received: by 2002:a17:902:9a91:b0:138:efd5:7302 with SMTP id w17-20020a1709029a9100b00138efd57302mr4242276plp.35.1634208588589; Thu, 14 Oct 2021 03:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634208588; cv=none; d=google.com; s=arc-20160816; b=bRqc9HJL4lr6NEIvVQnS5kywghWbf58ETxQCDgdx+A9Rbrp6WzywpAMFuWdhaV8GpR hKbu9HALo9nSiJuqwl6of3990UVcvFKWPpDF3aBCMFqcm/RVECb9b6D74vtxt1KG71qb YyNlpHmdC+Ga3zndZR9crJuxtRvba54KbgXIJOS3NzSIEerY6vro02azy2rgC72zadfz 8GocA3zDWYP2g0HZ7xXXc7Nd5yolyNarLheb0rY+j2EMeP9p6nRBMX1O1u2UO5z1wqd2 ZtctNzJpXyKtYkn4u9Rzp21C1qDqkeqokauHxwHOAS3PSlUriBQaabL+afoVGsc0cB5Z gvIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=5bWf83qDovQ+wZVzHSQWoSPpjePShCa6YEy63BrbDNc=; b=LlCn8eKeN7nLAxie+WaFPM/zTlYkWlepJGBEF5/2D9FqFqw/S33uT8VT62VIpy3EJa KnddkFvr3V3TODN+XXjDos7kH+sWc8JDytYlgs/FocOXwscSK/ckeC2NSeLutEKump8e /h10NJPUG6Eg7Elxx2HPPB6aY2Xag4boy9RRlN1EQKTOw6v8Y5q0rQrgZWfAAlxNMPKs hqm7lcbXZkd/jRy0Z+bQD/MnCbPLzxea7q+w/NmW/NJiLI5Nwtz2MN3cEwbDKwhViMqr 3w6foL7vAgvLVYyvNN37+9/y9dVcnGDLy4i4/Eqd7fMVHZiMC418QMLW0cLkT6lgbgZx r05w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si3143771pgv.249.2021.10.14.03.49.35; Thu, 14 Oct 2021 03:49:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbhJNKuE convert rfc822-to-8bit (ORCPT + 99 others); Thu, 14 Oct 2021 06:50:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbhJNKuC (ORCPT ); Thu, 14 Oct 2021 06:50:02 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CB99C061753 for ; Thu, 14 Oct 2021 03:47:57 -0700 (PDT) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mayH0-0007Yi-DW; Thu, 14 Oct 2021 12:47:42 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1mayGy-000205-T4; Thu, 14 Oct 2021 12:47:40 +0200 Message-ID: Subject: Re: [PATCH] media: imx: Constify static struct v4l2_m2m_ops From: Philipp Zabel To: Rikard Falkeborn , Steve Longerbeam , Mauro Carvalho Chehab Cc: Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Thu, 14 Oct 2021 12:47:40 +0200 In-Reply-To: <20211012214703.25433-1-rikard.falkeborn@gmail.com> References: <20211012214703.25433-1-rikard.falkeborn@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rikard, On Tue, 2021-10-12 at 23:47 +0200, Rikard Falkeborn wrote: > The only usage of m2m_ops is to pass its address to v4l2_m2m_init(), > which takes a pointer to const v4l2_m2m_ops as argument. Make it const > to allow the compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn > --- > drivers/staging/media/imx/imx-media-csc-scaler.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c > index eb6da9b9d8ba..1fd39a2fca98 100644 > --- a/drivers/staging/media/imx/imx-media-csc-scaler.c > +++ b/drivers/staging/media/imx/imx-media-csc-scaler.c > @@ -820,7 +820,7 @@ static const struct v4l2_file_operations ipu_csc_scaler_fops = { > .mmap = v4l2_m2m_fop_mmap, > }; > > -static struct v4l2_m2m_ops m2m_ops = { > +static const struct v4l2_m2m_ops m2m_ops = { > .device_run = device_run, > .job_abort = job_abort, > }; Thank you, Reviewed-by: Philipp Zabel regards Philipp