All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Helen Koike <helen.koike@collabora.com>
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: [PATCH 2/6] [media] vimc: constify video_subdev structures
Date: Tue,  8 Aug 2017 12:58:28 +0200	[thread overview]
Message-ID: <1502189912-28794-3-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1502189912-28794-1-git-send-email-Julia.Lawall@lip6.fr>

These structures are all only stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be const
as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/media/platform/vimc/vimc-debayer.c |    2 +-
 drivers/media/platform/vimc/vimc-scaler.c  |    2 +-
 drivers/media/platform/vimc/vimc-sensor.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/vimc/vimc-debayer.c b/drivers/media/platform/vimc/vimc-debayer.c
index 033a131..4d663e8 100644
--- a/drivers/media/platform/vimc/vimc-debayer.c
+++ b/drivers/media/platform/vimc/vimc-debayer.c
@@ -373,7 +373,7 @@ static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable)
 	return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_deb_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_deb_video_ops = {
 	.s_stream = vimc_deb_s_stream,
 };
 
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c
index 0a3e086..e1602e0 100644
--- a/drivers/media/platform/vimc/vimc-scaler.c
+++ b/drivers/media/platform/vimc/vimc-scaler.c
@@ -267,7 +267,7 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable)
 	return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_sca_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_sca_video_ops = {
 	.s_stream = vimc_sca_s_stream,
 };
 
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c
index 615c2b1..02e68c8 100644
--- a/drivers/media/platform/vimc/vimc-sensor.c
+++ b/drivers/media/platform/vimc/vimc-sensor.c
@@ -282,7 +282,7 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
 	return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_sen_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_sen_video_ops = {
 	.s_stream = vimc_sen_s_stream,
 };
 

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Helen Koike <helen.koike@collabora.com>
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: [PATCH 2/6] [media] vimc: constify video_subdev structures
Date: Tue, 08 Aug 2017 10:58:28 +0000	[thread overview]
Message-ID: <1502189912-28794-3-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1502189912-28794-1-git-send-email-Julia.Lawall@lip6.fr>

These structures are all only stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be const
as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/media/platform/vimc/vimc-debayer.c |    2 +-
 drivers/media/platform/vimc/vimc-scaler.c  |    2 +-
 drivers/media/platform/vimc/vimc-sensor.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/vimc/vimc-debayer.c b/drivers/media/platform/vimc/vimc-debayer.c
index 033a131..4d663e8 100644
--- a/drivers/media/platform/vimc/vimc-debayer.c
+++ b/drivers/media/platform/vimc/vimc-debayer.c
@@ -373,7 +373,7 @@ static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable)
 	return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_deb_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_deb_video_ops = {
 	.s_stream = vimc_deb_s_stream,
 };
 
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c
index 0a3e086..e1602e0 100644
--- a/drivers/media/platform/vimc/vimc-scaler.c
+++ b/drivers/media/platform/vimc/vimc-scaler.c
@@ -267,7 +267,7 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable)
 	return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_sca_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_sca_video_ops = {
 	.s_stream = vimc_sca_s_stream,
 };
 
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c
index 615c2b1..02e68c8 100644
--- a/drivers/media/platform/vimc/vimc-sensor.c
+++ b/drivers/media/platform/vimc/vimc-sensor.c
@@ -282,7 +282,7 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
 	return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_sen_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_sen_video_ops = {
 	.s_stream = vimc_sen_s_stream,
 };
 


  parent reply	other threads:[~2017-08-08 11:26 UTC|newest]

Thread overview: 25+ 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 ` Julia Lawall
2017-08-08 10:58 ` Julia Lawall
2017-08-08 10:58 ` [PATCH 1/6] [media] v4l: mt9t001: " Julia Lawall
2017-08-08 10:58   ` Julia Lawall
2017-08-08 22:07   ` Laurent Pinchart
2017-08-08 22:07     ` Laurent Pinchart
2017-08-08 10:58 ` Julia Lawall [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   ` Julia Lawall
2017-08-08 10:58 ` [PATCH 4/6] [media] media: mt9m111: " Julia Lawall
2017-08-08 10:58   ` Julia Lawall
2017-08-08 10:58 ` [PATCH 5/6] [media] exynos4-is: " Julia Lawall
2017-08-08 10:58   ` Julia Lawall
2017-08-08 10:58   ` Julia Lawall
     [not found]   ` <CGME20170808123709epcas2p229a31cfa19e3a5bf3986e547162e2613@epcas2p2.samsung.com>
2017-08-08 12:37     ` Sylwester Nawrocki
2017-08-08 12:37       ` Sylwester Nawrocki
2017-08-08 12:37       ` Sylwester Nawrocki
2017-08-08 10:58 ` [PATCH 6/6] [media] uvcvideo: " Julia Lawall
2017-08-08 10:58   ` Julia Lawall
2017-08-08 12:49   ` Laurent Pinchart
2017-08-08 12:49     ` Laurent Pinchart
2017-08-08 12:49     ` Julia Lawall
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=1502189912-28794-3-git-send-email-Julia.Lawall@lip6.fr \
    --to=julia.lawall@lip6.fr \
    --cc=bhumirks@gmail.com \
    --cc=helen.koike@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.