From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: bhumirks@gmail.com, kernel-janitors@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] [media] v4l: mt9t001: constify video_subdev structures
Date: Wed, 09 Aug 2017 01:07:30 +0300 [thread overview]
Message-ID: <5944526.BaCzTLmd28@avalon> (raw)
In-Reply-To: <1502189912-28794-2-git-send-email-Julia.Lawall@lip6.fr>
Hi Julia,
Thank you for the patch.
On Tuesday 08 Aug 2017 12:58:27 Julia Lawall wrote:
> The v4l2_subdev_ops structure is only passed as the third argument of
> v4l2_i2c_subdev_init, which is const, so the v4l2_subdev_ops structure
> can be const as well. The other structures are only stored in the
> v4l2_subdev_ops structure, all the fields of which are const, so these
> structures can also be const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/i2c/mt9t001.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/mt9t001.c b/drivers/media/i2c/mt9t001.c
> index 842017f..9d981d9 100644
> --- a/drivers/media/i2c/mt9t001.c
> +++ b/drivers/media/i2c/mt9t001.c
> @@ -822,15 +822,15 @@ static int mt9t001_close(struct v4l2_subdev *subdev,
> struct v4l2_subdev_fh *fh) return mt9t001_set_power(subdev, 0);
> }
>
> -static struct v4l2_subdev_core_ops mt9t001_subdev_core_ops = {
> +static const struct v4l2_subdev_core_ops mt9t001_subdev_core_ops = {
> .s_power = mt9t001_set_power,
> };
>
> -static struct v4l2_subdev_video_ops mt9t001_subdev_video_ops = {
> +static const struct v4l2_subdev_video_ops mt9t001_subdev_video_ops = {
> .s_stream = mt9t001_s_stream,
> };
>
> -static struct v4l2_subdev_pad_ops mt9t001_subdev_pad_ops = {
> +static const struct v4l2_subdev_pad_ops mt9t001_subdev_pad_ops = {
> .enum_mbus_code = mt9t001_enum_mbus_code,
> .enum_frame_size = mt9t001_enum_frame_size,
> .get_fmt = mt9t001_get_format,
> @@ -839,7 +839,7 @@ static int mt9t001_close(struct v4l2_subdev *subdev,
> struct v4l2_subdev_fh *fh) .set_selection = mt9t001_set_selection,
> };
>
> -static struct v4l2_subdev_ops mt9t001_subdev_ops = {
> +static const struct v4l2_subdev_ops mt9t001_subdev_ops = {
> .core = &mt9t001_subdev_core_ops,
> .video = &mt9t001_subdev_video_ops,
> .pad = &mt9t001_subdev_pad_ops,
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-08-08 22:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 10:58 [PATCH 0/6] constify video_subdev structures Julia Lawall
2017-08-08 10:58 ` [PATCH 1/6] [media] v4l: mt9t001: " Julia Lawall
2017-08-08 22:07 ` Laurent Pinchart [this message]
2017-08-08 10:58 ` [PATCH 2/6] [media] vimc: " Julia Lawall
2017-08-08 10:58 ` [PATCH 3/6] staging: atomisp: " Julia Lawall
2017-08-08 10:58 ` [PATCH 4/6] [media] media: mt9m111: " Julia Lawall
2017-08-08 10:58 ` [PATCH 5/6] [media] exynos4-is: " Julia Lawall
2017-08-08 12:37 ` Sylwester Nawrocki
2017-08-08 10:58 ` [PATCH 6/6] [media] uvcvideo: " Julia Lawall
2017-08-08 12:49 ` Laurent Pinchart
2017-08-08 12:49 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5944526.BaCzTLmd28@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=Julia.Lawall@lip6.fr \
--cc=bhumirks@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).