[GIT PULL FOR v3.10] v4l2: make arg of write-only ioctls const

2013-03-22 Thread Hans Verkuil
Hi Mauro,

This is the second and last phase of ensuring that the arguments of write-only
ioctls in V4L2 are const. The first phase was 4-5 months ago and added const
to s_crop, s_modulator, s_audio, s_audout, (un)subscribe_event, s_freq_hw_seek,
s_jpegcomp and s_fbuf.

This second phase adds const to s_frequency, s_tuner, s_std and s_register.
Actually, for s_std it doesn't add const but changes it to pass the std by
value which is more consistent in that particular case.

As a result drivers will be aware when they are implementing write-only ioctls
(and I saw a few drivers attempting to return data back to the user), and the
v4l2 core will know that drivers won't change the argument of a write-only
ioctls which simplifies the core debug code.

The changes have been compile-tested with the linux-media daily build but
I may have missed some more exotic architectures.

Ideally I would like to have this merged fairly early on so we have enough
time to shake out any remaining compile problems.

This pull request is identical to:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg59774.html and
http://www.mail-archive.com/linux-media@vger.kernel.org/msg59886.html with
this final change for radio-keene.c:

http://www.spinics.net/lists/linux-media/msg61339.html

Note that I will be making more pull requests based on top of this pull
request since you will get merge conflicts otherwise.

Regards,

Hans

The following changes since commit d7104bffcfb7a1a7f1dbb1274443e339588c2cb3:

  [media] MAINTAINERS: add drivers/media/tuners/it913x* (2013-03-21 19:06:43 
-0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git const2

for you to fetch changes up to 0b03adbbaef3e6ec164ba7647dd1f53f48ef76c5:

  v4l2-ioctl: add precision when printing names. (2013-03-22 09:31:28 +0100)


Hans Verkuil (6):
  v4l2: add const to argument of write-only s_frequency ioctl.
  v4l2: add const to argument of write-only s_tuner ioctl.
  v4l2: pass std by value to the write-only s_std ioctl.
  v4l2: add const to argument of write-only s_register ioctl.
  v4l2-ioctl: simplify debug code.
  v4l2-ioctl: add precision when printing names.

 drivers/media/common/saa7146/saa7146_video.c |4 +--
 drivers/media/dvb-frontends/au8522_decoder.c |2 +-
 drivers/media/i2c/ad9389b.c  |2 +-
 drivers/media/i2c/adv7183.c  |2 +-
 drivers/media/i2c/adv7604.c  |2 +-
 drivers/media/i2c/ak881x.c   |2 +-
 drivers/media/i2c/cs5345.c   |2 +-
 drivers/media/i2c/cx25840/cx25840-core.c |6 ++--
 drivers/media/i2c/m52790.c   |2 +-
 drivers/media/i2c/msp3400-driver.c   |4 +--
 drivers/media/i2c/mt9m032.c  |2 +-
 drivers/media/i2c/mt9v011.c  |2 +-
 drivers/media/i2c/ov7670.c   |2 +-
 drivers/media/i2c/saa6588.c  |2 +-
 drivers/media/i2c/saa7115.c  |2 +-
 drivers/media/i2c/saa7127.c  |2 +-
 drivers/media/i2c/saa717x.c  |4 +--
 drivers/media/i2c/soc_camera/mt9m001.c   |2 +-
 drivers/media/i2c/soc_camera/mt9m111.c   |2 +-
 drivers/media/i2c/soc_camera/mt9t031.c   |2 +-
 drivers/media/i2c/soc_camera/mt9t112.c   |2 +-
 drivers/media/i2c/soc_camera/mt9v022.c   |2 +-
 drivers/media/i2c/soc_camera/ov2640.c|2 +-
 drivers/media/i2c/soc_camera/ov5642.c|2 +-
 drivers/media/i2c/soc_camera/ov6650.c|2 +-
 drivers/media/i2c/soc_camera/ov772x.c|2 +-
 drivers/media/i2c/soc_camera/ov9640.c|2 +-
 drivers/media/i2c/soc_camera/ov9740.c|2 +-
 drivers/media/i2c/soc_camera/rj54n1cb0c.c|2 +-
 drivers/media/i2c/soc_camera/tw9910.c|2 +-
 drivers/media/i2c/tda9840.c  |2 +-
 drivers/media/i2c/tvaudio.c  |4 +--
 drivers/media/i2c/tvp5150.c  |2 +-
 drivers/media/i2c/tvp7002.c  |2 +-
 drivers/media/i2c/upd64031a.c|4 +--
 drivers/media/i2c/upd64083.c |2 +-
 drivers/media/i2c/vp27smpx.c |2 +-
 drivers/media/i2c/vs6624.c   |2 +-
 drivers/media/i2c/wm8775.c   |2 +-
 drivers/media/parport/pms.c  |4 +--
 drivers/media/pci/bt8xx/bttv-driver.c|   36 
+---
 drivers/media/pci/cx18/cx18-av-core.c|6 ++--
 drivers/media/pci/cx18/cx18-driver.c |2 +-
 drivers/media/pci/cx18/cx18-ioctl.c  |   50 
++---
 

Re: [GIT PULL FOR v3.10] v4l2: make arg of write-only ioctls const

2013-03-22 Thread Hans Verkuil
On Fri March 22 2013 11:35:17 Hans Verkuil wrote:
 Hi Mauro,
 
 This is the second and last phase of ensuring that the arguments of write-only
 ioctls in V4L2 are const. The first phase was 4-5 months ago and added const
 to s_crop, s_modulator, s_audio, s_audout, (un)subscribe_event, 
 s_freq_hw_seek,
 s_jpegcomp and s_fbuf.
 
 This second phase adds const to s_frequency, s_tuner, s_std and s_register.
 Actually, for s_std it doesn't add const but changes it to pass the std by
 value which is more consistent in that particular case.
 
 As a result drivers will be aware when they are implementing write-only ioctls
 (and I saw a few drivers attempting to return data back to the user), and the
 v4l2 core will know that drivers won't change the argument of a write-only
 ioctls which simplifies the core debug code.
 
 The changes have been compile-tested with the linux-media daily build but
 I may have missed some more exotic architectures.
 
 Ideally I would like to have this merged fairly early on so we have enough
 time to shake out any remaining compile problems.
 
 This pull request is identical to:
 
 http://www.mail-archive.com/linux-media@vger.kernel.org/msg59774.html and
 http://www.mail-archive.com/linux-media@vger.kernel.org/msg59886.html with
 this final change for radio-keene.c:
 
 http://www.spinics.net/lists/linux-media/msg61339.html
 
 Note that I will be making more pull requests based on top of this pull
 request since you will get merge conflicts otherwise.

Nacked-by: Hans Verkuil hans.verk...@cisco.com

I just discovered that after the recent merged the s_register patch causes
a compile warning in ths7303. Nacking this and posting a new one.

Regards,

Hans

 
 Regards,
 
 Hans
 
 The following changes since commit d7104bffcfb7a1a7f1dbb1274443e339588c2cb3:
 
   [media] MAINTAINERS: add drivers/media/tuners/it913x* (2013-03-21 19:06:43 
 -0300)
 
 are available in the git repository at:
 
   git://linuxtv.org/hverkuil/media_tree.git const2
 
 for you to fetch changes up to 0b03adbbaef3e6ec164ba7647dd1f53f48ef76c5:
 
   v4l2-ioctl: add precision when printing names. (2013-03-22 09:31:28 +0100)
 
 
 Hans Verkuil (6):
   v4l2: add const to argument of write-only s_frequency ioctl.
   v4l2: add const to argument of write-only s_tuner ioctl.
   v4l2: pass std by value to the write-only s_std ioctl.
   v4l2: add const to argument of write-only s_register ioctl.
   v4l2-ioctl: simplify debug code.
   v4l2-ioctl: add precision when printing names.
 
  drivers/media/common/saa7146/saa7146_video.c |4 +--
  drivers/media/dvb-frontends/au8522_decoder.c |2 +-
  drivers/media/i2c/ad9389b.c  |2 +-
  drivers/media/i2c/adv7183.c  |2 +-
  drivers/media/i2c/adv7604.c  |2 +-
  drivers/media/i2c/ak881x.c   |2 +-
  drivers/media/i2c/cs5345.c   |2 +-
  drivers/media/i2c/cx25840/cx25840-core.c |6 ++--
  drivers/media/i2c/m52790.c   |2 +-
  drivers/media/i2c/msp3400-driver.c   |4 +--
  drivers/media/i2c/mt9m032.c  |2 +-
  drivers/media/i2c/mt9v011.c  |2 +-
  drivers/media/i2c/ov7670.c   |2 +-
  drivers/media/i2c/saa6588.c  |2 +-
  drivers/media/i2c/saa7115.c  |2 +-
  drivers/media/i2c/saa7127.c  |2 +-
  drivers/media/i2c/saa717x.c  |4 +--
  drivers/media/i2c/soc_camera/mt9m001.c   |2 +-
  drivers/media/i2c/soc_camera/mt9m111.c   |2 +-
  drivers/media/i2c/soc_camera/mt9t031.c   |2 +-
  drivers/media/i2c/soc_camera/mt9t112.c   |2 +-
  drivers/media/i2c/soc_camera/mt9v022.c   |2 +-
  drivers/media/i2c/soc_camera/ov2640.c|2 +-
  drivers/media/i2c/soc_camera/ov5642.c|2 +-
  drivers/media/i2c/soc_camera/ov6650.c|2 +-
  drivers/media/i2c/soc_camera/ov772x.c|2 +-
  drivers/media/i2c/soc_camera/ov9640.c|2 +-
  drivers/media/i2c/soc_camera/ov9740.c|2 +-
  drivers/media/i2c/soc_camera/rj54n1cb0c.c|2 +-
  drivers/media/i2c/soc_camera/tw9910.c|2 +-
  drivers/media/i2c/tda9840.c  |2 +-
  drivers/media/i2c/tvaudio.c  |4 +--
  drivers/media/i2c/tvp5150.c  |2 +-
  drivers/media/i2c/tvp7002.c  |2 +-
  drivers/media/i2c/upd64031a.c|4 +--
  drivers/media/i2c/upd64083.c |2 +-
  drivers/media/i2c/vp27smpx.c |2 +-
  drivers/media/i2c/vs6624.c   |2 +-
  drivers/media/i2c/wm8775.c   |2 +-
  

[GIT PULL FOR v3.10] v4l2: make arg of write-only ioctls const

2013-03-22 Thread Hans Verkuil
Hi Mauro,

This is the second and last phase of ensuring that the arguments of write-only
ioctls in V4L2 are const. The first phase was 4-5 months ago and added const
to s_crop, s_modulator, s_audio, s_audout, (un)subscribe_event, s_freq_hw_seek,
s_jpegcomp and s_fbuf.

This second phase adds const to s_frequency, s_tuner, s_std and s_register.
Actually, for s_std it doesn't add const but changes it to pass the std by
value which is more consistent in that particular case.

As a result drivers will be aware when they are implementing write-only ioctls
(and I saw a few drivers attempting to return data back to the user), and the
v4l2 core will know that drivers won't change the argument of a write-only
ioctls which simplifies the core debug code.

The changes have been compile-tested with the linux-media daily build but
I may have missed some more exotic architectures.

Ideally I would like to have this merged fairly early on so we have enough
time to shake out any remaining compile problems.

This pull request is identical to:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg59774.html and
http://www.mail-archive.com/linux-media@vger.kernel.org/msg59886.html with
this final change for radio-keene.c:

http://www.spinics.net/lists/linux-media/msg61339.html

and an extra s_register change for the ths7303 due to the recently merged
ths7303 change.

Note that I will be making more pull requests based on top of this pull
request since you will get merge conflicts otherwise.

Regards,

Hans


The following changes since commit d7104bffcfb7a1a7f1dbb1274443e339588c2cb3:

  [media] MAINTAINERS: add drivers/media/tuners/it913x* (2013-03-21 19:06:43 
-0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git const

for you to fetch changes up to 8bf1a5a826d06a9b6f65b3e8dffb9be59d8937c3:

  v4l2-ioctl: add precision when printing names. (2013-03-22 11:59:21 +0100)


Hans Verkuil (6):
  v4l2: add const to argument of write-only s_frequency ioctl.
  v4l2: add const to argument of write-only s_tuner ioctl.
  v4l2: pass std by value to the write-only s_std ioctl.
  v4l2: add const to argument of write-only s_register ioctl.
  v4l2-ioctl: simplify debug code.
  v4l2-ioctl: add precision when printing names.

 drivers/media/common/saa7146/saa7146_video.c |4 +--
 drivers/media/dvb-frontends/au8522_decoder.c |2 +-
 drivers/media/i2c/ad9389b.c  |2 +-
 drivers/media/i2c/adv7183.c  |2 +-
 drivers/media/i2c/adv7604.c  |2 +-
 drivers/media/i2c/ak881x.c   |2 +-
 drivers/media/i2c/cs5345.c   |2 +-
 drivers/media/i2c/cx25840/cx25840-core.c |6 ++--
 drivers/media/i2c/m52790.c   |2 +-
 drivers/media/i2c/msp3400-driver.c   |4 +--
 drivers/media/i2c/mt9m032.c  |2 +-
 drivers/media/i2c/mt9v011.c  |2 +-
 drivers/media/i2c/ov7670.c   |2 +-
 drivers/media/i2c/saa6588.c  |2 +-
 drivers/media/i2c/saa7115.c  |2 +-
 drivers/media/i2c/saa7127.c  |2 +-
 drivers/media/i2c/saa717x.c  |4 +--
 drivers/media/i2c/soc_camera/mt9m001.c   |2 +-
 drivers/media/i2c/soc_camera/mt9m111.c   |2 +-
 drivers/media/i2c/soc_camera/mt9t031.c   |2 +-
 drivers/media/i2c/soc_camera/mt9t112.c   |2 +-
 drivers/media/i2c/soc_camera/mt9v022.c   |2 +-
 drivers/media/i2c/soc_camera/ov2640.c|2 +-
 drivers/media/i2c/soc_camera/ov5642.c|2 +-
 drivers/media/i2c/soc_camera/ov6650.c|2 +-
 drivers/media/i2c/soc_camera/ov772x.c|2 +-
 drivers/media/i2c/soc_camera/ov9640.c|2 +-
 drivers/media/i2c/soc_camera/ov9740.c|2 +-
 drivers/media/i2c/soc_camera/rj54n1cb0c.c|2 +-
 drivers/media/i2c/soc_camera/tw9910.c|2 +-
 drivers/media/i2c/tda9840.c  |2 +-
 drivers/media/i2c/ths7303.c  |2 +-
 drivers/media/i2c/tvaudio.c  |4 +--
 drivers/media/i2c/tvp5150.c  |2 +-
 drivers/media/i2c/tvp7002.c  |2 +-
 drivers/media/i2c/upd64031a.c|4 +--
 drivers/media/i2c/upd64083.c |2 +-
 drivers/media/i2c/vp27smpx.c |2 +-
 drivers/media/i2c/vs6624.c   |2 +-
 drivers/media/i2c/wm8775.c   |2 +-
 drivers/media/parport/pms.c  |4 +--
 drivers/media/pci/bt8xx/bttv-driver.c|   36 
+---
 drivers/media/pci/cx18/cx18-av-core.c|6 ++--