linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/68] Get rid of all warnings
@ 2012-10-27 20:40 Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 01/68] [media] siano: get rid of warning: no previous prototype Mauro Carvalho Chehab
                   ` (60 more replies)
  0 siblings, 61 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

There are too many warnings at the media tree, making impossible
to know when a new patch is adding new warnings or not. Get
rid of all of them (with make allyesconfig, i386).

Individual patches got c/c to the driver MAINTAINERS, using
	./scripts/get_maintainer.pl --no-git-fallback --no-l <patch>

If you're a maintainer for the touched drivers and weren't
c/c, please send me a patch updating the MAINTAINERS entries
for the boards you're maintaining.

PS.: The patches are also on my "experimental" tree, at branch
	"warnings_fix":

Mauro Carvalho Chehab (68):
  [media] siano: get rid of warning: no previous prototype
  [media] drxd_hard: get rid of warning: no previous prototype
  [media] rtl2830.c: get rid of warning: no previous prototype
  [media] rtl2832: get rid of warning: no previous prototype
  [media] stb0899_drv: get rid of warning: no previous prototype
  [media] stv0367: get rid of warning: no previous prototype
  [media] tda10071: get rid of warning: no previous prototype
  [media] tda18271c2dd.c: get rid of warning: no previous prototype
  [media] cx18: get rid of warning: no previous prototype
  [media] cx23885: get rid of warning: no previous prototype
  [media] cx23885-alsa: fix a false gcc warning at dprintk()
  [media] cx25821: get rid of warning: no previous prototype
  [media] dm1105: get rid of warning: no previous prototype
  [media] ivtv: get rid of warning: no previous prototype
  [media] ivtv-ioctl.c: remove an useless check
  [media] mantis: get rid of warning: no previous prototype
  [media] saa7164: get rid of warning: no previous prototype
  [media] radio-aimslab.c: get rid of warning: no previous prototype
  [media] radio-isa: get rid of warning: no previous prototype
  [media] radio-sf16fmi: get rid of warning: no previous prototype
  [media] ene_cir: get rid of warning: no previous prototype
  [media] ite-cir.c: get rid of warning: no previous prototype
  [media] nuvoton-cir: get rid of warning: no previous prototype
  [media] nuvoton-cir: carrier detect support is broken - remove it
  [media] max2165: get rid of warning: no previous prototype
  [media] au0828: get rid of warning: no previous prototype
  [media] cx231xx: get rid of warning: no previous prototype
  [media] cx231xx-avcore: get rid of a sophisticated do-nothing code
  [media] az6027: get rid of warning: no previous prototype
  [media] dvb-usb-v2: get rid of warning: no previous prototype
  [media] lmedm04: get rid of warning: no previous prototype
  [media] vp702x: get rid of warning: no previous prototype
  [media] pvrusb2: get rid of warning: no previous prototype
  [media] pwc-if: get rid of warning: no previous prototype
  [media] pwc-if: must check vb2_queue_init() success
  [media] dib9000: get rid of warning: no previous prototype
  [media] gscpa: get rid of warning: suggest braces around empty body
  [media] jeilinj: fix return of the response code
  [media] gspca: warning fix: index is unsigned, so it will never be
    below 0
  [media] dt3155v4l: vb2_queue_init() can now fail. Check is required
  [media] go7007-v4l2: warning fix: index is unsigned, so it will never
    be below 0
  [media] dvb_frontend: Don't declare values twice at a table
  [media] cx88: reorder inline to prevent a gcc warning
  [media] cx88: get rid of a warning at dprintk() macro
  [media] dmxdev: fix a comparition of unsigned expression warning
  [media] drxk: get rid of some unused vars
  [media] dvb-frontends: get rid of some "always false" warnings
  [media] soc_camera/ov2640: Don't use a temp var for an unused value
  [media] ngene: better comment unused code to avoid warnings
  [media] saa7134,saa7164: warning: comparison of unsigned fixes
  [media] meye: fix a warning
  [media] m2m-deinterlace: remove unused vars
  [media] tlg2300: index is unsigned, so never below zero
  [media] fmdrv: better define fmdbg() macro to avoid warnings
  [media] v4l2-common: h_bp var is unused at v4l2_detect_gtf()
  [media] tua9001: fix a warning
  [media] anysee: fix a warning
  [media] em28xx-cards: fix a warning
  [media] s2255drv: index is always positive
  [media] usbvision-core: fix a warning
  [media] zr364xx: urb actual_length is unsigned
  [media] bttv-driver: fix two warnings
  [media] cx25840-core: get rid of warning: no previous prototype
  [media] au0828-dvb: ret is never tested. Get rid of it
  [media] soc_camera: ret is never used. get rid of it
  [media] fmdrv: Don't check if unsigned are below zero
  fintek-cir: get rid of warning: no previous prototype     Cc: Linux
    Media Mailing List <linux-media@vger.kernel.org>
  radio tea5764, si4713: get rid of warning: no previous prototype    
    drivers/media/radio/radio-tea5764.c:148:5: warning: no previous
    prototype for 'tea5764_i2c_read' [-Wmissing-prototypes]    
    drivers/media/radio/radio-tea5764.c:168:5: warning: no previous
    prototype for 'tea5764_i2c_write' [-Wmissing-prototypes]    
    drivers/media/radio/si4713-i2c.c:1772:6: warning: no previous
    prototype for 'si4713_ioctl' [-Wmissing-prototypes]

 drivers/media/common/siano/smscoreapi.c            |  2 +-
 drivers/media/dvb-core/dmxdev.c                    |  2 +-
 drivers/media/dvb-core/dvb_frontend.c              | 10 -----
 drivers/media/dvb-frontends/cx22700.c              |  4 +-
 drivers/media/dvb-frontends/cx24123.c              |  2 +-
 drivers/media/dvb-frontends/dib9000.h              |  2 +-
 drivers/media/dvb-frontends/drxd_hard.c            |  8 ++--
 drivers/media/dvb-frontends/drxk_hard.c            | 15 --------
 drivers/media/dvb-frontends/drxk_hard.h            |  6 +--
 drivers/media/dvb-frontends/l64781.c               |  4 +-
 drivers/media/dvb-frontends/mt312.c                |  4 +-
 drivers/media/dvb-frontends/rtl2830.c              |  6 +--
 drivers/media/dvb-frontends/rtl2832.c              |  6 +--
 drivers/media/dvb-frontends/stb0899_drv.c          |  2 +-
 drivers/media/dvb-frontends/stv0367.c              | 19 ++++-----
 drivers/media/dvb-frontends/tda10071.c             |  6 ++-
 drivers/media/dvb-frontends/tda18271c2dd.c         |  1 +
 drivers/media/i2c/cx25840/cx25840-core.c           |  2 +-
 drivers/media/i2c/soc_camera/ov2640.c              |  6 +--
 drivers/media/pci/bt8xx/bttv-driver.c              |  7 ++--
 drivers/media/pci/cx18/cx18-alsa-main.c            |  2 +-
 drivers/media/pci/cx18/cx18-alsa-pcm.c             |  1 +
 drivers/media/pci/cx18/cx18-streams.c              |  2 +-
 drivers/media/pci/cx23885/altera-ci.c              | 45 +++++++++++-----------
 drivers/media/pci/cx23885/cimax2.c                 | 17 ++++----
 drivers/media/pci/cx23885/cx23885-alsa.c           |  6 ++-
 drivers/media/pci/cx23885/cx23885-av.c             |  1 +
 drivers/media/pci/cx23885/cx23885-cards.c          |  2 +-
 drivers/media/pci/cx23885/cx23885-core.c           |  2 +-
 drivers/media/pci/cx23885/cx23885-dvb.c            |  2 +-
 drivers/media/pci/cx23885/cx23885-f300.c           |  1 +
 drivers/media/pci/cx23885/cx23885-input.c          |  1 +
 drivers/media/pci/cx23885/cx23885-input.h          |  2 +-
 drivers/media/pci/cx23885/cx23885-ioctl.c          |  2 +
 drivers/media/pci/cx23885/cx23885-ir.c             |  1 +
 drivers/media/pci/cx23885/cx23888-ir.c             |  1 +
 drivers/media/pci/cx23885/netup-init.c             |  1 +
 drivers/media/pci/cx25821/cx25821-audio-upstream.c | 16 ++++----
 drivers/media/pci/cx25821/cx25821-biffuncs.h       |  6 +--
 drivers/media/pci/cx25821/cx25821-i2c.c            |  4 +-
 .../media/pci/cx25821/cx25821-video-upstream-ch2.c | 24 +++++++-----
 drivers/media/pci/cx25821/cx25821-video-upstream.c | 32 ++++++++-------
 drivers/media/pci/cx25821/cx25821-video.c          |  8 ++--
 drivers/media/pci/cx88/cx88-alsa.c                 | 14 ++++---
 drivers/media/pci/cx88/cx88-blackbird.c            |  7 ++--
 drivers/media/pci/cx88/cx88-core.c                 | 12 +++---
 drivers/media/pci/cx88/cx88-mpeg.c                 | 14 ++++---
 drivers/media/pci/cx88/cx88.h                      |  4 +-
 drivers/media/pci/dm1105/dm1105.c                  |  4 +-
 drivers/media/pci/ivtv/ivtv-alsa-main.c            |  2 +-
 drivers/media/pci/ivtv/ivtv-alsa-pcm.c             |  6 ++-
 drivers/media/pci/ivtv/ivtv-alsa-pcm.h             |  4 --
 drivers/media/pci/ivtv/ivtv-firmware.c             |  2 +-
 drivers/media/pci/ivtv/ivtv-ioctl.c                |  4 +-
 drivers/media/pci/mantis/mantis_input.c            |  5 ++-
 drivers/media/pci/mantis/mantis_uart.c             |  2 +-
 drivers/media/pci/mantis/mantis_vp1033.c           |  6 +--
 drivers/media/pci/meye/meye.c                      |  2 +-
 drivers/media/pci/ngene/ngene-cards.c              |  4 +-
 drivers/media/pci/ngene/ngene-core.c               |  4 +-
 drivers/media/pci/saa7134/saa7134-core.c           |  3 +-
 drivers/media/pci/saa7134/saa7134-video.c          |  2 +-
 drivers/media/pci/saa7164/saa7164-api.c            | 26 +++++++------
 drivers/media/pci/saa7164/saa7164-bus.c            |  6 +--
 drivers/media/pci/saa7164/saa7164-cmd.c            | 16 ++++----
 drivers/media/pci/saa7164/saa7164-core.c           |  4 +-
 drivers/media/pci/saa7164/saa7164-encoder.c        | 15 ++++----
 drivers/media/pci/saa7164/saa7164-fw.c             |  8 ++--
 drivers/media/pci/saa7164/saa7164-vbi.c            |  6 ++-
 drivers/media/platform/m2m-deinterlace.c           | 10 +----
 drivers/media/platform/soc_camera/soc_camera.c     |  4 +-
 drivers/media/radio/radio-aimslab.c                |  2 +-
 drivers/media/radio/radio-isa.c                    | 10 +++--
 drivers/media/radio/radio-sf16fmi.c                |  2 +-
 drivers/media/radio/radio-tea5764.c                |  4 +-
 drivers/media/radio/si4713-i2c.c                   |  2 +-
 drivers/media/radio/wl128x/fmdrv.h                 |  2 +-
 drivers/media/radio/wl128x/fmdrv_common.c          |  2 +-
 drivers/media/radio/wl128x/fmdrv_rx.c              |  2 +-
 drivers/media/rc/ene_ir.c                          |  2 +-
 drivers/media/rc/fintek-cir.c                      |  4 +-
 drivers/media/rc/ite-cir.c                         |  4 +-
 drivers/media/rc/nuvoton-cir.c                     | 11 ++----
 drivers/media/rc/nuvoton-cir.h                     |  1 -
 drivers/media/tuners/max2165.c                     |  2 +-
 drivers/media/tuners/tua9001.c                     |  2 +-
 drivers/media/usb/au0828/au0828-cards.c            |  2 +-
 drivers/media/usb/au0828/au0828-dvb.c              |  5 +--
 drivers/media/usb/au0828/au0828-video.c            | 16 ++++----
 drivers/media/usb/cx231xx/cx231xx-avcore.c         |  9 +----
 drivers/media/usb/cx231xx/cx231xx-cards.c          |  8 ++--
 drivers/media/usb/cx231xx/cx231xx-i2c.c            |  4 +-
 drivers/media/usb/dvb-usb-v2/anysee.c              |  2 +-
 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c        | 14 +++----
 drivers/media/usb/dvb-usb-v2/lmedm04.c             |  2 +-
 drivers/media/usb/dvb-usb-v2/usb_urb.c             |  8 ++--
 drivers/media/usb/dvb-usb/az6027.c                 | 11 +++---
 drivers/media/usb/dvb-usb/vp702x.c                 |  8 ++--
 drivers/media/usb/em28xx/em28xx-cards.c            |  2 +-
 drivers/media/usb/gspca/gspca.c                    |  3 +-
 drivers/media/usb/gspca/gspca.h                    |  2 +-
 drivers/media/usb/gspca/jeilinj.c                  |  6 +--
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c           |  4 +-
 drivers/media/usb/pwc/pwc-if.c                     |  8 +++-
 drivers/media/usb/s2255/s2255drv.c                 |  2 +-
 drivers/media/usb/tlg2300/pd-video.c               |  4 +-
 drivers/media/usb/usbvision/usbvision.h            |  2 +-
 drivers/media/usb/zr364xx/zr364xx.c                |  3 +-
 drivers/media/v4l2-core/v4l2-common.c              |  3 +-
 drivers/staging/media/dt3155v4l/dt3155v4l.c        |  4 +-
 drivers/staging/media/go7007/go7007-v4l2.c         |  2 +-
 111 files changed, 340 insertions(+), 335 deletions(-)

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 01/68] [media] siano: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 02/68] [media] drxd_hard: " Mauro Carvalho Chehab
                   ` (59 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/common/siano/smscoreapi.c:1095:26: warning: no previous prototype for 'get_entry' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/common/siano/smscoreapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c
index 9cc5554..1842e64 100644
--- a/drivers/media/common/siano/smscoreapi.c
+++ b/drivers/media/common/siano/smscoreapi.c
@@ -1092,7 +1092,7 @@ EXPORT_SYMBOL_GPL(smscore_onresponse);
  * @return pointer to descriptor on success, NULL on error.
  */
 
-struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)
+static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)
 {
 	struct smscore_buffer_t *cb = NULL;
 	unsigned long flags;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 02/68] [media] drxd_hard: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 01/68] [media] siano: get rid of warning: no previous prototype Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 04/68] [media] rtl2832: " Mauro Carvalho Chehab
                   ` (58 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/drxd_hard.c:1751:5: warning: no previous prototype for 'SetOperationMode' [-Wmissing-prototypes]
drivers/media/dvb-frontends/drxd_hard.c:2615:5: warning: no previous prototype for 'DRXD_init' [-Wmissing-prototypes]
drivers/media/dvb-frontends/drxd_hard.c:2777:5: warning: no previous prototype for 'DRXD_status' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/drxd_hard.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb-frontends/drxd_hard.c b/drivers/media/dvb-frontends/drxd_hard.c
index 6d98537..e71cc60 100644
--- a/drivers/media/dvb-frontends/drxd_hard.c
+++ b/drivers/media/dvb-frontends/drxd_hard.c
@@ -1748,7 +1748,8 @@ static int DRX_Stop(struct drxd_state *state)
 	return status;
 }
 
-int SetOperationMode(struct drxd_state *state, int oMode)
+#if 0	/* Currently unused */
+static int SetOperationMode(struct drxd_state *state, int oMode)
 {
 	int status;
 
@@ -1788,6 +1789,7 @@ int SetOperationMode(struct drxd_state *state, int oMode)
 		state->operation_mode = oMode;
 	return status;
 }
+#endif
 
 static int StartDiversity(struct drxd_state *state)
 {
@@ -2612,7 +2614,7 @@ static int CDRXD(struct drxd_state *state, u32 IntermediateFrequency)
 	return 0;
 }
 
-int DRXD_init(struct drxd_state *state, const u8 * fw, u32 fw_size)
+static int DRXD_init(struct drxd_state *state, const u8 *fw, u32 fw_size)
 {
 	int status = 0;
 	u32 driverVersion;
@@ -2774,7 +2776,7 @@ int DRXD_init(struct drxd_state *state, const u8 * fw, u32 fw_size)
 	return status;
 }
 
-int DRXD_status(struct drxd_state *state, u32 * pLockStatus)
+static int DRXD_status(struct drxd_state *state, u32 *pLockStatus)
 {
 	DRX_GetLockStatus(state, pLockStatus);
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 04/68] [media] rtl2832: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 01/68] [media] siano: get rid of warning: no previous prototype Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 02/68] [media] drxd_hard: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 05/68] [media] stb0899_drv: " Mauro Carvalho Chehab
                   ` (57 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/rtl2832.c:268:5: warning: no previous prototype for 'rtl2832_rd_demod_reg' [-Wmissing-prototypes]
drivers/media/dvb-frontends/rtl2832.c:308:5: warning: no previous prototype for 'rtl2832_wr_demod_reg' [-Wmissing-prototypes]
drivers/media/dvb-frontends/rtl2832.c:513:5: warning: no previous prototype for 'rtl2832_get_tune_settings' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/rtl2832.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c
index 80c8e5f..7388769 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -265,7 +265,7 @@ static int rtl2832_rd_reg(struct rtl2832_priv *priv, u8 reg, u8 page, u8 *val)
 	return rtl2832_rd_regs(priv, reg, page, val, 1);
 }
 
-int rtl2832_rd_demod_reg(struct rtl2832_priv *priv, int reg, u32 *val)
+static int rtl2832_rd_demod_reg(struct rtl2832_priv *priv, int reg, u32 *val)
 {
 	int ret;
 
@@ -305,7 +305,7 @@ err:
 
 }
 
-int rtl2832_wr_demod_reg(struct rtl2832_priv *priv, int reg, u32 val)
+static int rtl2832_wr_demod_reg(struct rtl2832_priv *priv, int reg, u32 val)
 {
 	int ret, i;
 	u8 len;
@@ -510,7 +510,7 @@ static int rtl2832_sleep(struct dvb_frontend *fe)
 	return 0;
 }
 
-int rtl2832_get_tune_settings(struct dvb_frontend *fe,
+static int rtl2832_get_tune_settings(struct dvb_frontend *fe,
 	struct dvb_frontend_tune_settings *s)
 {
 	struct rtl2832_priv *priv = fe->demodulator_priv;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 05/68] [media] stb0899_drv: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 04/68] [media] rtl2832: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 06/68] [media] stv0367: " Mauro Carvalho Chehab
                   ` (56 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/stb0899_drv.c:1263:5: warning: no previous prototype for 'stb0899_get_dev_id' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/stb0899_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/stb0899_drv.c b/drivers/media/dvb-frontends/stb0899_drv.c
index 79e29de..cc278b3 100644
--- a/drivers/media/dvb-frontends/stb0899_drv.c
+++ b/drivers/media/dvb-frontends/stb0899_drv.c
@@ -1260,7 +1260,7 @@ static inline void CONVERT32(u32 x, char *str)
 	*str	= '\0';
 }
 
-int stb0899_get_dev_id(struct stb0899_state *state)
+static int stb0899_get_dev_id(struct stb0899_state *state)
 {
 	u8 chip_id, release;
 	u16 id;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 06/68] [media] stv0367: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 05/68] [media] stb0899_drv: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 07/68] [media] tda10071: " Mauro Carvalho Chehab
                   ` (55 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/stv0367.c:1267:25: warning: no previous prototype for 'stv0367ter_lock_algo' [-Wmissing-prototypes]
drivers/media/dvb-frontends/stv0367.c:1531:5: warning: no previous prototype for 'stv0367ter_init' [-Wmissing-prototypes]
drivers/media/dvb-frontends/stv0367.c:2381:21: warning: no previous prototype for 'stv0367cab_SetQamSize' [-Wmissing-prototypes]
drivers/media/dvb-frontends/stv0367.c:2765:5: warning: no previous prototype for 'stv0367cab_init' [-Wmissing-prototypes]
drivers/media/dvb-frontends/stv0367.c:882:4: warning: no previous prototype for 'stv0367_getbits' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/stv0367.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
index 2a8aaeb..0c8e459 100644
--- a/drivers/media/dvb-frontends/stv0367.c
+++ b/drivers/media/dvb-frontends/stv0367.c
@@ -879,7 +879,8 @@ static u8 stv0367_readbits(struct stv0367_state *state, u32 label)
 	return val;
 }
 
-u8 stv0367_getbits(u8 reg, u32 label)
+#if 0 /* Currently, unused */
+static u8 stv0367_getbits(u8 reg, u32 label)
 {
 	u8 mask, pos;
 
@@ -887,7 +888,7 @@ u8 stv0367_getbits(u8 reg, u32 label)
 
 	return (reg & mask) >> pos;
 }
-
+#endif
 static int stv0367ter_gate_ctrl(struct dvb_frontend *fe, int enable)
 {
 	struct stv0367_state *state = fe->demodulator_priv;
@@ -1263,8 +1264,8 @@ stv0367_ter_signal_type stv0367ter_check_cpamp(struct stv0367_state *state,
 	return CPAMPStatus;
 }
 
-enum
-stv0367_ter_signal_type stv0367ter_lock_algo(struct stv0367_state *state)
+static enum stv0367_ter_signal_type
+stv0367ter_lock_algo(struct stv0367_state *state)
 {
 	enum stv0367_ter_signal_type ret_flag;
 	short int wd, tempo;
@@ -1528,7 +1529,7 @@ static int stv0367ter_sleep(struct dvb_frontend *fe)
 	return stv0367ter_standby(fe, 1);
 }
 
-int stv0367ter_init(struct dvb_frontend *fe)
+static int stv0367ter_init(struct dvb_frontend *fe)
 {
 	struct stv0367_state *state = fe->demodulator_priv;
 	struct stv0367ter_state *ter_state = state->ter_state;
@@ -2378,9 +2379,9 @@ static u32 stv0367cab_get_adc_freq(struct dvb_frontend *fe, u32 ExtClk_Hz)
 	return ADCClk_Hz;
 }
 
-enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
-					u32 SymbolRate,
-					enum stv0367cab_mod QAMSize)
+static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
+						 u32 SymbolRate,
+						 enum stv0367cab_mod QAMSize)
 {
 	/* Set QAM size */
 	stv0367_writebits(state, F367CAB_QAM_MODE, QAMSize);
@@ -2762,7 +2763,7 @@ static int stv0367cab_sleep(struct dvb_frontend *fe)
 	return stv0367cab_standby(fe, 1);
 }
 
-int stv0367cab_init(struct dvb_frontend *fe)
+static int stv0367cab_init(struct dvb_frontend *fe)
 {
 	struct stv0367_state *state = fe->demodulator_priv;
 	struct stv0367cab_state *cab_state = state->cab_state;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 07/68] [media] tda10071: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (4 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 06/68] [media] stv0367: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 08/68] [media] tda18271c2dd.c: " Mauro Carvalho Chehab
                   ` (54 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Antti Palosaari

drivers/media/dvb-frontends/tda10071.c:119:5: warning: no previous prototype for 'tda10071_rd_reg_mask' [-Wmissing-prototypes]
drivers/media/dvb-frontends/tda10071.c:99:5: warning: no previous prototype for 'tda10071_wr_reg_mask' [-Wmissing-prototypes]

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/tda10071.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
index a83bf68..16a4bc5 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -96,7 +96,8 @@ static int tda10071_rd_reg(struct tda10071_priv *priv, u8 reg, u8 *val)
 }
 
 /* write single register with mask */
-int tda10071_wr_reg_mask(struct tda10071_priv *priv, u8 reg, u8 val, u8 mask)
+static int tda10071_wr_reg_mask(struct tda10071_priv *priv,
+				u8 reg, u8 val, u8 mask)
 {
 	int ret;
 	u8 tmp;
@@ -116,7 +117,8 @@ int tda10071_wr_reg_mask(struct tda10071_priv *priv, u8 reg, u8 val, u8 mask)
 }
 
 /* read single register with mask */
-int tda10071_rd_reg_mask(struct tda10071_priv *priv, u8 reg, u8 *val, u8 mask)
+static int tda10071_rd_reg_mask(struct tda10071_priv *priv,
+				u8 reg, u8 *val, u8 mask)
 {
 	int ret, i;
 	u8 tmp;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 08/68] [media] tda18271c2dd.c: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (5 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 07/68] [media] tda10071: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 09/68] [media] cx18: " Mauro Carvalho Chehab
                   ` (53 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/tda18271c2dd.c:1224:22: warning: no previous prototype for 'tda18271c2dd_attach' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/tda18271c2dd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c
index ad7c72e..d281f77 100644
--- a/drivers/media/dvb-frontends/tda18271c2dd.c
+++ b/drivers/media/dvb-frontends/tda18271c2dd.c
@@ -32,6 +32,7 @@
 #include <asm/div64.h>
 
 #include "dvb_frontend.h"
+#include "tda18271c2dd.h"
 
 struct SStandardParam {
 	s32   m_IFFrequency;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 09/68] [media] cx18: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (6 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 08/68] [media] tda18271c2dd.c: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 10/68] [media] cx23885: " Mauro Carvalho Chehab
                   ` (52 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Andy Walls

drivers/media/pci/cx18/cx18-alsa-main.c:200:5: warning: no previous prototype for 'cx18_alsa_load' [-Wmissing-prototypes]
drivers/media/pci/cx18/cx18-alsa-pcm.c:325:5: warning: no previous prototype for 'snd_cx18_pcm_create' [-Wmissing-prototypes]
drivers/media/pci/cx18/cx18-alsa-pcm.c:72:6: warning: no previous prototype for 'cx18_alsa_announce_pcm_data' [-Wmissing-prototypes]
drivers/media/pci/cx18/cx18-streams.c:100:6: warning: no previous prototype for 'cx18_dma_free' [-Wmissing-prototypes]

Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/cx18/cx18-alsa-main.c | 2 +-
 drivers/media/pci/cx18/cx18-alsa-pcm.c  | 1 +
 drivers/media/pci/cx18/cx18-streams.c   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/cx18/cx18-alsa-main.c b/drivers/media/pci/cx18/cx18-alsa-main.c
index 6d2a982..8e971ff 100644
--- a/drivers/media/pci/cx18/cx18-alsa-main.c
+++ b/drivers/media/pci/cx18/cx18-alsa-main.c
@@ -197,7 +197,7 @@ err_exit:
 	return ret;
 }
 
-int cx18_alsa_load(struct cx18 *cx)
+static int __init cx18_alsa_load(struct cx18 *cx)
 {
 	struct v4l2_device *v4l2_dev = &cx->v4l2_dev;
 	struct cx18_stream *s;
diff --git a/drivers/media/pci/cx18/cx18-alsa-pcm.c b/drivers/media/pci/cx18/cx18-alsa-pcm.c
index 7a5b84a..180077c 100644
--- a/drivers/media/pci/cx18/cx18-alsa-pcm.c
+++ b/drivers/media/pci/cx18/cx18-alsa-pcm.c
@@ -37,6 +37,7 @@
 #include "cx18-streams.h"
 #include "cx18-fileops.h"
 #include "cx18-alsa.h"
+#include "cx18-alsa-pcm.h"
 
 static unsigned int pcm_debug;
 module_param(pcm_debug, int, 0644);
diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c
index 72af9b5..843c62b 100644
--- a/drivers/media/pci/cx18/cx18-streams.c
+++ b/drivers/media/pci/cx18/cx18-streams.c
@@ -97,7 +97,7 @@ static struct {
 };
 
 
-void cx18_dma_free(struct videobuf_queue *q,
+static void cx18_dma_free(struct videobuf_queue *q,
 	struct cx18_stream *s, struct cx18_videobuf_buffer *buf)
 {
 	videobuf_waiton(q, &buf->vb, 0, 0);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 10/68] [media] cx23885: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (7 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 09/68] [media] cx18: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 11/68] [media] cx23885-alsa: fix a false gcc warning at dprintk() Mauro Carvalho Chehab
                   ` (51 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/cx23885/altera-ci.c:266:5: warning: no previous prototype for 'altera_ci_op_cam' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:301:5: warning: no previous prototype for 'altera_ci_read_attribute_mem' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:307:5: warning: no previous prototype for 'altera_ci_write_attribute_mem' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:313:5: warning: no previous prototype for 'altera_ci_read_cam_ctl' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:319:5: warning: no previous prototype for 'altera_ci_write_cam_ctl' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:325:5: warning: no previous prototype for 'altera_ci_slot_reset' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:368:5: warning: no previous prototype for 'altera_ci_slot_shutdown' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:374:5: warning: no previous prototype for 'altera_ci_slot_ts_ctl' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:451:5: warning: no previous prototype for 'altera_poll_ci_slot_status' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:462:6: warning: no previous prototype for 'altera_hw_filt_release' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:584:5: warning: no previous prototype for 'altera_pid_feed_control' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:606:5: warning: no previous prototype for 'altera_ci_start_feed' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:613:5: warning: no previous prototype for 'altera_ci_stop_feed' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:620:5: warning: no previous prototype for 'altera_ci_start_feed_1' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:625:5: warning: no previous prototype for 'altera_ci_stop_feed_1' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:630:5: warning: no previous prototype for 'altera_ci_start_feed_2' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:635:5: warning: no previous prototype for 'altera_ci_stop_feed_2' [-Wmissing-prototypes]
drivers/media/pci/cx23885/altera-ci.c:640:5: warning: no previous prototype for 'altera_hw_filt_init' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:123:5: warning: no previous prototype for 'netup_write_i2c' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:150:5: warning: no previous prototype for 'netup_ci_get_mem' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:169:5: warning: no previous prototype for 'netup_ci_op_cam' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:239:5: warning: no previous prototype for 'netup_ci_read_attribute_mem' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:245:5: warning: no previous prototype for 'netup_ci_write_attribute_mem' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:251:5: warning: no previous prototype for 'netup_ci_read_cam_ctl' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:257:5: warning: no previous prototype for 'netup_ci_write_cam_ctl' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:263:5: warning: no previous prototype for 'netup_ci_slot_reset' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:292:5: warning: no previous prototype for 'netup_ci_slot_shutdown' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:298:5: warning: no previous prototype for 'netup_ci_set_irq' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:319:5: warning: no previous prototype for 'netup_ci_slot_ts_ctl' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:375:5: warning: no previous prototype for 'netup_ci_slot_status' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:402:5: warning: no previous prototype for 'netup_poll_ci_slot_status' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:415:5: warning: no previous prototype for 'netup_ci_init' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:520:6: warning: no previous prototype for 'netup_ci_exit' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cimax2.c:90:5: warning: no previous prototype for 'netup_read_i2c' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-av.c:26:6: warning: no previous prototype for 'cx23885_av_work_handler' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-cards.c:1430:5: warning: no previous prototype for 'netup_jtag_io' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-core.c:306:6: warning: no previous prototype for 'cx23885_irq_add' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-dvb.c:662:5: warning: no previous prototype for 'netup_altera_fpga_rw' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-f300.c:150:5: warning: no previous prototype for 'f300_set_voltage' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-input.c:249:5: warning: no previous prototype for 'cx23885_input_init' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-input.c:353:6: warning: no previous prototype for 'cx23885_input_fini' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-input.c:76:6: warning: no previous prototype for 'cx23885_input_rx_work_handler' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ioctl.c:134:5: warning: no previous prototype for 'cx23885_g_register' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ioctl.c:185:5: warning: no previous prototype for 'cx23885_s_register' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ioctl.c:27:5: warning: no previous prototype for 'cx23885_g_chip_ident' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ir.c:101:6: warning: no previous prototype for 'cx23885_ir_tx_v4l2_dev_notify' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ir.c:37:6: warning: no previous prototype for 'cx23885_ir_rx_work_handler' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ir.c:60:6: warning: no previous prototype for 'cx23885_ir_tx_work_handler' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23885-ir.c:76:6: warning: no previous prototype for 'cx23885_ir_rx_v4l2_dev_notify' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23888-ir.c:1203:5: warning: no previous prototype for 'cx23888_ir_probe' [-Wmissing-prototypes]
drivers/media/pci/cx23885/cx23888-ir.c:1253:5: warning: no previous prototype for 'cx23888_ir_remove' [-Wmissing-prototypes]
drivers/media/pci/cx23885/netup-init.c:109:6: warning: no previous prototype for 'netup_initialize' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/cx23885/altera-ci.c     | 45 ++++++++++++++++---------------
 drivers/media/pci/cx23885/cimax2.c        | 17 +++++++-----
 drivers/media/pci/cx23885/cx23885-av.c    |  1 +
 drivers/media/pci/cx23885/cx23885-cards.c |  2 +-
 drivers/media/pci/cx23885/cx23885-core.c  |  2 +-
 drivers/media/pci/cx23885/cx23885-dvb.c   |  2 +-
 drivers/media/pci/cx23885/cx23885-f300.c  |  1 +
 drivers/media/pci/cx23885/cx23885-input.c |  1 +
 drivers/media/pci/cx23885/cx23885-input.h |  2 +-
 drivers/media/pci/cx23885/cx23885-ioctl.c |  2 ++
 drivers/media/pci/cx23885/cx23885-ir.c    |  1 +
 drivers/media/pci/cx23885/cx23888-ir.c    |  1 +
 drivers/media/pci/cx23885/netup-init.c    |  1 +
 13 files changed, 45 insertions(+), 33 deletions(-)

diff --git a/drivers/media/pci/cx23885/altera-ci.c b/drivers/media/pci/cx23885/altera-ci.c
index 495781e..2926f7f 100644
--- a/drivers/media/pci/cx23885/altera-ci.c
+++ b/drivers/media/pci/cx23885/altera-ci.c
@@ -263,7 +263,7 @@ static int netup_fpga_op_rw(struct fpga_internal *inter, int addr,
 }
 
 /* flag - mem/io, read - read/write */
-int altera_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot,
+static int altera_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot,
 				u8 flag, u8 read, int addr, u8 val)
 {
 
@@ -298,31 +298,32 @@ int altera_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot,
 	return mem;
 }
 
-int altera_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
-						int slot, int addr)
+static int altera_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
+					int slot, int addr)
 {
 	return altera_ci_op_cam(en50221, slot, 0, NETUP_CI_FLG_RD, addr, 0);
 }
 
-int altera_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
-						int slot, int addr, u8 data)
+static int altera_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
+					 int slot, int addr, u8 data)
 {
 	return altera_ci_op_cam(en50221, slot, 0, 0, addr, data);
 }
 
-int altera_ci_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr)
+static int altera_ci_read_cam_ctl(struct dvb_ca_en50221 *en50221,
+				  int slot, u8 addr)
 {
 	return altera_ci_op_cam(en50221, slot, NETUP_CI_FLG_CTL,
 						NETUP_CI_FLG_RD, addr, 0);
 }
 
-int altera_ci_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot,
-						u8 addr, u8 data)
+static int altera_ci_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot,
+				   u8 addr, u8 data)
 {
 	return altera_ci_op_cam(en50221, slot, NETUP_CI_FLG_CTL, 0, addr, data);
 }
 
-int altera_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot)
+static int altera_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot)
 {
 	struct altera_ci_state *state = en50221->data;
 	struct fpga_internal *inter = state->internal;
@@ -365,13 +366,13 @@ int altera_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot)
 	return 0;
 }
 
-int altera_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot)
+static int altera_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot)
 {
 	/* not implemented */
 	return 0;
 }
 
-int altera_ci_slot_ts_ctl(struct dvb_ca_en50221 *en50221, int slot)
+static int altera_ci_slot_ts_ctl(struct dvb_ca_en50221 *en50221, int slot)
 {
 	struct altera_ci_state *state = en50221->data;
 	struct fpga_internal *inter = state->internal;
@@ -448,8 +449,8 @@ int altera_ci_irq(void *dev)
 }
 EXPORT_SYMBOL(altera_ci_irq);
 
-int altera_poll_ci_slot_status(struct dvb_ca_en50221 *en50221, int slot,
-								int open)
+static int altera_poll_ci_slot_status(struct dvb_ca_en50221 *en50221,
+				      int slot, int open)
 {
 	struct altera_ci_state *state = en50221->data;
 
@@ -459,7 +460,7 @@ int altera_poll_ci_slot_status(struct dvb_ca_en50221 *en50221, int slot,
 	return state->status;
 }
 
-void altera_hw_filt_release(void *main_dev, int filt_nr)
+static void altera_hw_filt_release(void *main_dev, int filt_nr)
 {
 	struct fpga_inode *temp_int = find_inode(main_dev);
 	struct netup_hw_pid_filter *pid_filt = NULL;
@@ -581,7 +582,7 @@ static void altera_toggle_fullts_streaming(struct netup_hw_pid_filter *pid_filt,
 	mutex_unlock(&inter->fpga_mutex);
 }
 
-int altera_pid_feed_control(void *demux_dev, int filt_nr,
+static int altera_pid_feed_control(void *demux_dev, int filt_nr,
 		struct dvb_demux_feed *feed, int onoff)
 {
 	struct fpga_inode *temp_int = find_dinode(demux_dev);
@@ -603,41 +604,41 @@ int altera_pid_feed_control(void *demux_dev, int filt_nr,
 }
 EXPORT_SYMBOL(altera_pid_feed_control);
 
-int altera_ci_start_feed(struct dvb_demux_feed *feed, int num)
+static int altera_ci_start_feed(struct dvb_demux_feed *feed, int num)
 {
 	altera_pid_feed_control(feed->demux, num, feed, 1);
 
 	return 0;
 }
 
-int altera_ci_stop_feed(struct dvb_demux_feed *feed, int num)
+static int altera_ci_stop_feed(struct dvb_demux_feed *feed, int num)
 {
 	altera_pid_feed_control(feed->demux, num, feed, 0);
 
 	return 0;
 }
 
-int altera_ci_start_feed_1(struct dvb_demux_feed *feed)
+static int altera_ci_start_feed_1(struct dvb_demux_feed *feed)
 {
 	return altera_ci_start_feed(feed, 1);
 }
 
-int altera_ci_stop_feed_1(struct dvb_demux_feed *feed)
+static int altera_ci_stop_feed_1(struct dvb_demux_feed *feed)
 {
 	return altera_ci_stop_feed(feed, 1);
 }
 
-int altera_ci_start_feed_2(struct dvb_demux_feed *feed)
+static int altera_ci_start_feed_2(struct dvb_demux_feed *feed)
 {
 	return altera_ci_start_feed(feed, 2);
 }
 
-int altera_ci_stop_feed_2(struct dvb_demux_feed *feed)
+static int altera_ci_stop_feed_2(struct dvb_demux_feed *feed)
 {
 	return altera_ci_stop_feed(feed, 2);
 }
 
-int altera_hw_filt_init(struct altera_ci_config *config, int hw_filt_nr)
+static int altera_hw_filt_init(struct altera_ci_config *config, int hw_filt_nr)
 {
 	struct netup_hw_pid_filter *pid_filt = NULL;
 	struct fpga_inode *temp_int = find_inode(config->dev);
diff --git a/drivers/media/pci/cx23885/cimax2.c b/drivers/media/pci/cx23885/cimax2.c
index 6617774..7344849 100644
--- a/drivers/media/pci/cx23885/cimax2.c
+++ b/drivers/media/pci/cx23885/cimax2.c
@@ -24,6 +24,7 @@
  */
 
 #include "cx23885.h"
+#include "cimax2.h"
 #include "dvb_ca_en50221.h"
 /**** Bit definitions for MC417_RWD and MC417_OEN registers  ***
   bits 31-16
@@ -87,7 +88,7 @@ struct netup_ci_state {
 };
 
 
-int netup_read_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg,
+static int netup_read_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg,
 						u8 *buf, int len)
 {
 	int ret;
@@ -120,7 +121,7 @@ int netup_read_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg,
 	return 0;
 }
 
-int netup_write_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg,
+static int netup_write_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg,
 						u8 *buf, int len)
 {
 	int ret;
@@ -147,7 +148,7 @@ int netup_write_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg,
 	return 0;
 }
 
-int netup_ci_get_mem(struct cx23885_dev *dev)
+static int netup_ci_get_mem(struct cx23885_dev *dev)
 {
 	int mem;
 	unsigned long timeout = jiffies + msecs_to_jiffies(1);
@@ -166,7 +167,7 @@ int netup_ci_get_mem(struct cx23885_dev *dev)
 	return mem & 0xff;
 }
 
-int netup_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot,
+static int netup_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot,
 				u8 flag, u8 read, int addr, u8 data)
 {
 	struct netup_ci_state *state = en50221->data;
@@ -248,7 +249,8 @@ int netup_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
 	return netup_ci_op_cam(en50221, slot, 0, 0, addr, data);
 }
 
-int netup_ci_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr)
+int netup_ci_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot,
+				 u8 addr)
 {
 	return netup_ci_op_cam(en50221, slot, NETUP_CI_CTL,
 							NETUP_CI_RD, addr, 0);
@@ -295,7 +297,7 @@ int netup_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot)
 	return 0;
 }
 
-int netup_ci_set_irq(struct dvb_ca_en50221 *en50221, u8 irq_mode)
+static int netup_ci_set_irq(struct dvb_ca_en50221 *en50221, u8 irq_mode)
 {
 	struct netup_ci_state *state = en50221->data;
 	int ret;
@@ -399,7 +401,8 @@ int netup_ci_slot_status(struct cx23885_dev *dev, u32 pci_status)
 	return 1;
 }
 
-int netup_poll_ci_slot_status(struct dvb_ca_en50221 *en50221, int slot, int open)
+int netup_poll_ci_slot_status(struct dvb_ca_en50221 *en50221,
+				     int slot, int open)
 {
 	struct netup_ci_state *state = en50221->data;
 
diff --git a/drivers/media/pci/cx23885/cx23885-av.c b/drivers/media/pci/cx23885/cx23885-av.c
index 134ebdd..e958a01 100644
--- a/drivers/media/pci/cx23885/cx23885-av.c
+++ b/drivers/media/pci/cx23885/cx23885-av.c
@@ -22,6 +22,7 @@
  */
 
 #include "cx23885.h"
+#include "cx23885-av.h"
 
 void cx23885_av_work_handler(struct work_struct *work)
 {
diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index 5acdf95..6277e145 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -1427,7 +1427,7 @@ void cx23885_ir_fini(struct cx23885_dev *dev)
 	}
 }
 
-int netup_jtag_io(void *device, int tms, int tdi, int read_tdo)
+static int netup_jtag_io(void *device, int tms, int tdi, int read_tdo)
 {
 	int data;
 	int tdo = 0;
diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c
index 4189d64..065ecd5 100644
--- a/drivers/media/pci/cx23885/cx23885-core.c
+++ b/drivers/media/pci/cx23885/cx23885-core.c
@@ -303,7 +303,7 @@ static struct sram_channel cx23887_sram_channels[] = {
 	},
 };
 
-void cx23885_irq_add(struct cx23885_dev *dev, u32 mask)
+static void cx23885_irq_add(struct cx23885_dev *dev, u32 mask)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&dev->pci_irqmask_lock, flags);
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 4379d8a..2f5b902 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -659,7 +659,7 @@ static struct mt2063_config terratec_mt2063_config[] = {
 	},
 };
 
-int netup_altera_fpga_rw(void *device, int flag, int data, int read)
+static int netup_altera_fpga_rw(void *device, int flag, int data, int read)
 {
 	struct cx23885_dev *dev = (struct cx23885_dev *)device;
 	unsigned long timeout = jiffies + msecs_to_jiffies(1);
diff --git a/drivers/media/pci/cx23885/cx23885-f300.c b/drivers/media/pci/cx23885/cx23885-f300.c
index 93998f2..5444cc5 100644
--- a/drivers/media/pci/cx23885/cx23885-f300.c
+++ b/drivers/media/pci/cx23885/cx23885-f300.c
@@ -29,6 +29,7 @@
  */
 
 #include "cx23885.h"
+#include "cx23885-f300.h"
 
 #define F300_DATA	GPIO_0
 #define F300_RESET	GPIO_1
diff --git a/drivers/media/pci/cx23885/cx23885-input.c b/drivers/media/pci/cx23885/cx23885-input.c
index 2004039..4f1055a 100644
--- a/drivers/media/pci/cx23885/cx23885-input.c
+++ b/drivers/media/pci/cx23885/cx23885-input.c
@@ -40,6 +40,7 @@
 #include <media/v4l2-subdev.h>
 
 #include "cx23885.h"
+#include "cx23885-input.h"
 
 #define MODULE_NAME "cx23885"
 
diff --git a/drivers/media/pci/cx23885/cx23885-input.h b/drivers/media/pci/cx23885/cx23885-input.h
index 75ef15d..87dc44e 100644
--- a/drivers/media/pci/cx23885/cx23885-input.h
+++ b/drivers/media/pci/cx23885/cx23885-input.h
@@ -23,7 +23,7 @@
 
 #ifndef _CX23885_INPUT_H_
 #define _CX23885_INPUT_H_
-int cx23885_input_rx_work_handler(struct cx23885_dev *dev, u32 events);
+void cx23885_input_rx_work_handler(struct cx23885_dev *dev, u32 events);
 
 int cx23885_input_init(struct cx23885_dev *dev);
 void cx23885_input_fini(struct cx23885_dev *dev);
diff --git a/drivers/media/pci/cx23885/cx23885-ioctl.c b/drivers/media/pci/cx23885/cx23885-ioctl.c
index 44812ca..ea9a614 100644
--- a/drivers/media/pci/cx23885/cx23885-ioctl.c
+++ b/drivers/media/pci/cx23885/cx23885-ioctl.c
@@ -22,6 +22,8 @@
  */
 
 #include "cx23885.h"
+#include "cx23885-ioctl.h"
+
 #include <media/v4l2-chip-ident.h>
 
 int cx23885_g_chip_ident(struct file *file, void *fh,
diff --git a/drivers/media/pci/cx23885/cx23885-ir.c b/drivers/media/pci/cx23885/cx23885-ir.c
index 7125247..bfef193 100644
--- a/drivers/media/pci/cx23885/cx23885-ir.c
+++ b/drivers/media/pci/cx23885/cx23885-ir.c
@@ -24,6 +24,7 @@
 #include <media/v4l2-device.h>
 
 #include "cx23885.h"
+#include "cx23885-ir.h"
 #include "cx23885-input.h"
 
 #define CX23885_IR_RX_FIFO_SERVICE_REQ		0
diff --git a/drivers/media/pci/cx23885/cx23888-ir.c b/drivers/media/pci/cx23885/cx23888-ir.c
index c2bc39c..c4bd1e9 100644
--- a/drivers/media/pci/cx23885/cx23888-ir.c
+++ b/drivers/media/pci/cx23885/cx23888-ir.c
@@ -29,6 +29,7 @@
 #include <media/rc-core.h>
 
 #include "cx23885.h"
+#include "cx23888-ir.h"
 
 static unsigned int ir_888_debug;
 module_param(ir_888_debug, int, 0644);
diff --git a/drivers/media/pci/cx23885/netup-init.c b/drivers/media/pci/cx23885/netup-init.c
index f4893e6..0044fef 100644
--- a/drivers/media/pci/cx23885/netup-init.c
+++ b/drivers/media/pci/cx23885/netup-init.c
@@ -24,6 +24,7 @@
  */
 
 #include "cx23885.h"
+#include "netup-init.h"
 
 static void i2c_av_write(struct i2c_adapter *i2c, u16 reg, u8 val)
 {
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 11/68] [media] cx23885-alsa: fix a false gcc warning at dprintk()
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (8 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 10/68] [media] cx23885: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 12/68] [media] cx25821: get rid of warning: no previous prototype Mauro Carvalho Chehab
                   ` (50 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Change dprintk logic to avoid the following warning:
drivers/media/pci/cx23885/cx23885-alsa.c: In function 'cx23885_audio_register':
drivers/media/pci/cx23885/cx23885-alsa.c:515:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/cx23885/cx23885-alsa.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c
index 7951692..c6c9bd5 100644
--- a/drivers/media/pci/cx23885/cx23885-alsa.c
+++ b/drivers/media/pci/cx23885/cx23885-alsa.c
@@ -45,8 +45,10 @@
 
 #define AUDIO_SRAM_CHANNEL	SRAM_CH07
 
-#define dprintk(level, fmt, arg...)	if (audio_debug >= level) \
-	printk(KERN_INFO "%s: " fmt, chip->dev->name , ## arg)
+#define dprintk(level, fmt, arg...) do {				\
+	if (audio_debug + 1 > level)					\
+		printk(KERN_INFO "%s: " fmt, chip->dev->name , ## arg);	\
+} while(0)
 
 #define dprintk_core(level, fmt, arg...)	if (audio_debug >= level) \
 	printk(KERN_DEBUG "%s: " fmt, chip->dev->name , ## arg)
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 12/68] [media] cx25821: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (9 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 11/68] [media] cx23885-alsa: fix a false gcc warning at dprintk() Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 13/68] [media] dm1105: " Mauro Carvalho Chehab
                   ` (49 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/cx25821/cx25821-audio-upstream.c:136:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream_audio' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-audio-upstream.c:200:6: warning: no previous prototype for 'cx25821_free_memory_audio' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-audio-upstream.c:259:5: warning: no previous prototype for 'cx25821_get_audio_data' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-audio-upstream.c:354:5: warning: no previous prototype for 'cx25821_openfile_audio' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-audio-upstream.c:47:5: warning: no previous prototype for 'cx25821_sram_channel_setup_upstream_audio' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-audio-upstream.c:493:5: warning: no previous prototype for 'cx25821_audio_upstream_irq' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-audio-upstream.c:637:5: warning: no previous prototype for 'cx25821_start_audio_dma_upstream' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-biffuncs.h:28:11: warning: no previous prototype for 'getBit' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-biffuncs.h:33:12: warning: no previous prototype for 'clearBitAtPos' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-biffuncs.h:38:12: warning: no previous prototype for 'setBitAtPos' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-i2c.c:332:6: warning: no previous prototype for 'cx25821_av_clk' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video.c:294:5: warning: no previous prototype for 'cx25821_restart_video_queue' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video.c:345:6: warning: no previous prototype for 'cx25821_vid_timeout' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:176:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:303:5: warning: no previous prototype for 'cx25821_get_frame' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:408:5: warning: no previous prototype for 'cx25821_openfile' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:489:5: warning: no previous prototype for 'cx25821_upstream_buffer_prepare' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:551:5: warning: no previous prototype for 'cx25821_video_upstream_irq' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:667:6: warning: no previous prototype for 'cx25821_set_pixelengine' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream.c:699:5: warning: no previous prototype for 'cx25821_start_video_dma_upstream' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:126:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream_ch2' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:258:5: warning: no previous prototype for 'cx25821_get_frame_ch2' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:363:5: warning: no previous prototype for 'cx25821_openfile_ch2' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:510:5: warning: no previous prototype for 'cx25821_video_upstream_irq_ch2' [-Wmissing-prototypes]
drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:650:5: warning: no previous prototype for 'cx25821_start_video_dma_upstream_ch2' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/cx25821/cx25821-audio-upstream.c | 16 +++++------
 drivers/media/pci/cx25821/cx25821-biffuncs.h       |  6 ++--
 drivers/media/pci/cx25821/cx25821-i2c.c            |  4 ++-
 .../media/pci/cx25821/cx25821-video-upstream-ch2.c | 24 +++++++++-------
 drivers/media/pci/cx25821/cx25821-video-upstream.c | 32 ++++++++++++----------
 drivers/media/pci/cx25821/cx25821-video.c          |  8 +++---
 6 files changed, 50 insertions(+), 40 deletions(-)

diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
index 8b2a999..ad84613 100644
--- a/drivers/media/pci/cx25821/cx25821-audio-upstream.c
+++ b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
@@ -44,7 +44,7 @@ MODULE_LICENSE("GPL");
 static int _intr_msk = FLD_AUD_SRC_RISCI1 | FLD_AUD_SRC_OF |
 			FLD_AUD_SRC_SYNC | FLD_AUD_SRC_OPC_ERR;
 
-int cx25821_sram_channel_setup_upstream_audio(struct cx25821_dev *dev,
+static int cx25821_sram_channel_setup_upstream_audio(struct cx25821_dev *dev,
 					      struct sram_channel *ch,
 					      unsigned int bpl, u32 risc)
 {
@@ -133,7 +133,7 @@ static __le32 *cx25821_risc_field_upstream_audio(struct cx25821_dev *dev,
 	return rp;
 }
 
-int cx25821_risc_buffer_upstream_audio(struct cx25821_dev *dev,
+static int cx25821_risc_buffer_upstream_audio(struct cx25821_dev *dev,
 				       struct pci_dev *pci,
 				       unsigned int bpl, unsigned int lines)
 {
@@ -197,7 +197,7 @@ int cx25821_risc_buffer_upstream_audio(struct cx25821_dev *dev,
 	return 0;
 }
 
-void cx25821_free_memory_audio(struct cx25821_dev *dev)
+static void cx25821_free_memory_audio(struct cx25821_dev *dev)
 {
 	if (dev->_risc_virt_addr) {
 		pci_free_consistent(dev->pci, dev->_audiorisc_size,
@@ -256,7 +256,7 @@ void cx25821_free_mem_upstream_audio(struct cx25821_dev *dev)
 	cx25821_free_memory_audio(dev);
 }
 
-int cx25821_get_audio_data(struct cx25821_dev *dev,
+static int cx25821_get_audio_data(struct cx25821_dev *dev,
 			   struct sram_channel *sram_ch)
 {
 	struct file *myfile;
@@ -351,7 +351,7 @@ static void cx25821_audioups_handler(struct work_struct *work)
 			sram_channels);
 }
 
-int cx25821_openfile_audio(struct cx25821_dev *dev,
+static int cx25821_openfile_audio(struct cx25821_dev *dev,
 			   struct sram_channel *sram_ch)
 {
 	struct file *myfile;
@@ -490,7 +490,7 @@ error:
 	return ret;
 }
 
-int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,
+static int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,
 			       u32 status)
 {
 	int i = 0;
@@ -634,8 +634,8 @@ static void cx25821_wait_fifo_enable(struct cx25821_dev *dev,
 
 }
 
-int cx25821_start_audio_dma_upstream(struct cx25821_dev *dev,
-				     struct sram_channel *sram_ch)
+static int cx25821_start_audio_dma_upstream(struct cx25821_dev *dev,
+					    struct sram_channel *sram_ch)
 {
 	u32 tmp = 0;
 	int err = 0;
diff --git a/drivers/media/pci/cx25821/cx25821-biffuncs.h b/drivers/media/pci/cx25821/cx25821-biffuncs.h
index 9326a7c..937f5a7 100644
--- a/drivers/media/pci/cx25821/cx25821-biffuncs.h
+++ b/drivers/media/pci/cx25821/cx25821-biffuncs.h
@@ -25,17 +25,17 @@
 
 #define SetBit(Bit)  (1 << Bit)
 
-inline u8 getBit(u32 sample, u8 index)
+static inline u8 getBit(u32 sample, u8 index)
 {
 	return (u8) ((sample >> index) & 1);
 }
 
-inline u32 clearBitAtPos(u32 value, u8 bit)
+static inline u32 clearBitAtPos(u32 value, u8 bit)
 {
 	return value & ~(1 << bit);
 }
 
-inline u32 setBitAtPos(u32 sample, u8 bit)
+static inline u32 setBitAtPos(u32 sample, u8 bit)
 {
 	sample |= (1 << bit);
 	return sample;
diff --git a/drivers/media/pci/cx25821/cx25821-i2c.c b/drivers/media/pci/cx25821/cx25821-i2c.c
index 9844549..a8dc945 100644
--- a/drivers/media/pci/cx25821/cx25821-i2c.c
+++ b/drivers/media/pci/cx25821/cx25821-i2c.c
@@ -329,7 +329,8 @@ int cx25821_i2c_unregister(struct cx25821_i2c *bus)
 	return 0;
 }
 
-void cx25821_av_clk(struct cx25821_dev *dev, int enable)
+#if 0 /* Currently unused */
+static void cx25821_av_clk(struct cx25821_dev *dev, int enable)
 {
 	/* write 0 to bus 2 addr 0x144 via i2x_xfer() */
 	char buffer[3];
@@ -351,6 +352,7 @@ void cx25821_av_clk(struct cx25821_dev *dev, int enable)
 
 	i2c_xfer(&dev->i2c_bus[0].i2c_adap, &msg, 1);
 }
+#endif
 
 int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value)
 {
diff --git a/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c b/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
index d33fc1a..f7a6e6b 100644
--- a/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
+++ b/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
@@ -123,10 +123,11 @@ static __le32 *cx25821_risc_field_upstream_ch2(struct cx25821_dev *dev,
 	return rp;
 }
 
-int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
-				     struct pci_dev *pci,
-				     unsigned int top_offset, unsigned int bpl,
-				     unsigned int lines)
+static int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
+					    struct pci_dev *pci,
+					    unsigned int top_offset,
+					    unsigned int bpl,
+					    unsigned int lines)
 {
 	__le32 *rp;
 	int fifo_enable = 0;
@@ -255,7 +256,8 @@ void cx25821_free_mem_upstream_ch2(struct cx25821_dev *dev)
 	}
 }
 
-int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)
+static int cx25821_get_frame_ch2(struct cx25821_dev *dev,
+				 struct sram_channel *sram_ch)
 {
 	struct file *myfile;
 	int frame_index_temp = dev->_frame_index_ch2;
@@ -360,7 +362,8 @@ static void cx25821_vidups_handler_ch2(struct work_struct *work)
 			_channel2_upstream_select].sram_channels);
 }
 
-int cx25821_openfile_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)
+static int cx25821_openfile_ch2(struct cx25821_dev *dev,
+				struct sram_channel *sram_ch)
 {
 	struct file *myfile;
 	int i = 0, j = 0;
@@ -507,8 +510,9 @@ error:
 	return ret;
 }
 
-int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
-				   u32 status)
+static int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev,
+					  int chan_num,
+					  u32 status)
 {
 	u32 int_msk_tmp;
 	struct sram_channel *channel = dev->channels[chan_num].sram_channels;
@@ -647,8 +651,8 @@ static void cx25821_set_pixelengine_ch2(struct cx25821_dev *dev,
 	cx_write(ch->vid_cdt_size, VID_CDT_SIZE >> 3);
 }
 
-int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev,
-					 struct sram_channel *sram_ch)
+static int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev,
+						struct sram_channel *sram_ch)
 {
 	u32 tmp = 0;
 	int err = 0;
diff --git a/drivers/media/pci/cx25821/cx25821-video-upstream.c b/drivers/media/pci/cx25821/cx25821-video-upstream.c
index 6759fff..cca643c 100644
--- a/drivers/media/pci/cx25821/cx25821-video-upstream.c
+++ b/drivers/media/pci/cx25821/cx25821-video-upstream.c
@@ -173,10 +173,10 @@ static __le32 *cx25821_risc_field_upstream(struct cx25821_dev *dev, __le32 * rp,
 	return rp;
 }
 
-int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,
-				 struct pci_dev *pci,
-				 unsigned int top_offset,
-				 unsigned int bpl, unsigned int lines)
+static int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,
+					struct pci_dev *pci,
+					unsigned int top_offset,
+					unsigned int bpl, unsigned int lines)
 {
 	__le32 *rp;
 	int fifo_enable = 0;
@@ -300,7 +300,8 @@ void cx25821_free_mem_upstream_ch1(struct cx25821_dev *dev)
 	}
 }
 
-int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)
+static int cx25821_get_frame(struct cx25821_dev *dev,
+			     struct sram_channel *sram_ch)
 {
 	struct file *myfile;
 	int frame_index_temp = dev->_frame_index;
@@ -405,7 +406,8 @@ static void cx25821_vidups_handler(struct work_struct *work)
 			sram_channels);
 }
 
-int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)
+static int cx25821_openfile(struct cx25821_dev *dev,
+			    struct sram_channel *sram_ch)
 {
 	struct file *myfile;
 	int i = 0, j = 0;
@@ -486,8 +488,9 @@ int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)
 	return 0;
 }
 
-int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,
-				    struct sram_channel *sram_ch, int bpl)
+static int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,
+					   struct sram_channel *sram_ch,
+					   int bpl)
 {
 	int ret = 0;
 	dma_addr_t dma_addr;
@@ -548,8 +551,8 @@ error:
 	return ret;
 }
 
-int cx25821_video_upstream_irq(struct cx25821_dev *dev, int chan_num,
-			       u32 status)
+static int cx25821_video_upstream_irq(struct cx25821_dev *dev, int chan_num,
+				      u32 status)
 {
 	u32 int_msk_tmp;
 	struct sram_channel *channel = dev->channels[chan_num].sram_channels;
@@ -664,8 +667,9 @@ static irqreturn_t cx25821_upstream_irq(int irq, void *dev_id)
 	return IRQ_RETVAL(handled);
 }
 
-void cx25821_set_pixelengine(struct cx25821_dev *dev, struct sram_channel *ch,
-			     int pix_format)
+static void cx25821_set_pixelengine(struct cx25821_dev *dev,
+				    struct sram_channel *ch,
+				    int pix_format)
 {
 	int width = WIDTH_D1;
 	int height = dev->_lines_count;
@@ -696,8 +700,8 @@ void cx25821_set_pixelengine(struct cx25821_dev *dev, struct sram_channel *ch,
 	cx_write(ch->vid_cdt_size, VID_CDT_SIZE >> 3);
 }
 
-int cx25821_start_video_dma_upstream(struct cx25821_dev *dev,
-				     struct sram_channel *sram_ch)
+static int cx25821_start_video_dma_upstream(struct cx25821_dev *dev,
+					    struct sram_channel *sram_ch)
 {
 	u32 tmp = 0;
 	int err = 0;
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
index 0a80245..53b16dd 100644
--- a/drivers/media/pci/cx25821/cx25821-video.c
+++ b/drivers/media/pci/cx25821/cx25821-video.c
@@ -291,9 +291,9 @@ int cx25821_start_video_dma(struct cx25821_dev *dev,
 	return 0;
 }
 
-int cx25821_restart_video_queue(struct cx25821_dev *dev,
-				struct cx25821_dmaqueue *q,
-				struct sram_channel *channel)
+static int cx25821_restart_video_queue(struct cx25821_dev *dev,
+				       struct cx25821_dmaqueue *q,
+				       struct sram_channel *channel)
 {
 	struct cx25821_buffer *buf, *prev;
 	struct list_head *item;
@@ -342,7 +342,7 @@ int cx25821_restart_video_queue(struct cx25821_dev *dev,
 	}
 }
 
-void cx25821_vid_timeout(unsigned long data)
+static void cx25821_vid_timeout(unsigned long data)
 {
 	struct cx25821_data *timeout_data = (struct cx25821_data *)data;
 	struct cx25821_dev *dev = timeout_data->dev;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 13/68] [media] dm1105: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (10 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 12/68] [media] cx25821: get rid of warning: no previous prototype Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 14/68] [media] ivtv: " Mauro Carvalho Chehab
                   ` (48 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/dm1105/dm1105.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c
index a609b3a..d0dfa5d 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -736,7 +736,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
+static int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
 {
 	struct rc_dev *dev;
 	int err = -ENOMEM;
@@ -776,7 +776,7 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
 	return 0;
 }
 
-void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105)
+static void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105)
 {
 	rc_unregister_device(dm1105->ir.dev);
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 14/68] [media] ivtv: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (11 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 13/68] [media] dm1105: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 15/68] [media] ivtv-ioctl.c: remove an useless check Mauro Carvalho Chehab
                   ` (47 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Andy Walls

drivers/media/pci/ivtv/ivtv-alsa-main.c:208:5: warning: no previous prototype for 'ivtv_alsa_load' [-Wmissing-prototypes]
drivers/media/pci/ivtv/ivtv-alsa-pcm.c:325:5: warning: no previous prototype for 'snd_ivtv_pcm_create' [-Wmissing-prototypes]
drivers/media/pci/ivtv/ivtv-alsa-pcm.c:72:6: warning: no previous prototype for 'ivtv_alsa_announce_pcm_data' [-Wmissing-prototypes]
drivers/media/pci/ivtv/ivtv-firmware.c:279:5: warning: no previous prototype for 'ivtv_firmware_restart' [-Wmissing-prototypes]
drivers/media/pci/ivtv/ivtv-ioctl.c:1171:5: warning: no previous prototype for 'ivtv_s_std' [-Wmissing-prototypes]

Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/ivtv/ivtv-alsa-main.c | 2 +-
 drivers/media/pci/ivtv/ivtv-alsa-pcm.c  | 6 ++++--
 drivers/media/pci/ivtv/ivtv-alsa-pcm.h  | 4 ----
 drivers/media/pci/ivtv/ivtv-firmware.c  | 2 +-
 drivers/media/pci/ivtv/ivtv-ioctl.c     | 2 +-
 5 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c b/drivers/media/pci/ivtv/ivtv-alsa-main.c
index 8deab16..4a221c6 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-main.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c
@@ -205,7 +205,7 @@ err_exit:
 	return ret;
 }
 
-int ivtv_alsa_load(struct ivtv *itv)
+static int __init ivtv_alsa_load(struct ivtv *itv)
 {
 	struct v4l2_device *v4l2_dev = &itv->v4l2_dev;
 	struct ivtv_stream *s;
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
index f7022bd..e1863db 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
@@ -37,6 +37,7 @@
 #include "ivtv-streams.h"
 #include "ivtv-fileops.h"
 #include "ivtv-alsa.h"
+#include "ivtv-alsa-pcm.h"
 
 static unsigned int pcm_debug;
 module_param(pcm_debug, int, 0644);
@@ -69,8 +70,9 @@ static struct snd_pcm_hardware snd_ivtv_hw_capture = {
 	.periods_max = 98,		/* 12544, */
 };
 
-void ivtv_alsa_announce_pcm_data(struct snd_ivtv_card *itvsc, u8 *pcm_data,
-				 size_t num_bytes)
+static void ivtv_alsa_announce_pcm_data(struct snd_ivtv_card *itvsc,
+					u8 *pcm_data,
+					size_t num_bytes)
 {
 	struct snd_pcm_substream *substream;
 	struct snd_pcm_runtime *runtime;
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.h b/drivers/media/pci/ivtv/ivtv-alsa-pcm.h
index 5ab1831..23dfe0d 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.h
+++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.h
@@ -21,7 +21,3 @@
  */
 
 int __init snd_ivtv_pcm_create(struct snd_ivtv_card *itvsc);
-
-/* Used by ivtv driver to announce the PCM data to the module */
-void ivtv_alsa_announce_pcm_data(struct snd_ivtv_card *card, u8 *pcm_data,
-				 size_t num_bytes);
diff --git a/drivers/media/pci/ivtv/ivtv-firmware.c b/drivers/media/pci/ivtv/ivtv-firmware.c
index 6ec7705..68387d4 100644
--- a/drivers/media/pci/ivtv/ivtv-firmware.c
+++ b/drivers/media/pci/ivtv/ivtv-firmware.c
@@ -276,7 +276,7 @@ void ivtv_init_mpeg_decoder(struct ivtv *itv)
 }
 
 /* Try to restart the card & restore previous settings */
-int ivtv_firmware_restart(struct ivtv *itv)
+static int ivtv_firmware_restart(struct ivtv *itv)
 {
 	int rc = 0;
 	v4l2_std_id std;
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 949ae23..31a69eb 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -1168,7 +1168,7 @@ void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id *std)
 	}
 }
 
-int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std)
+static int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std)
 {
 	struct ivtv *itv = fh2id(fh)->itv;
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 15/68] [media] ivtv-ioctl.c: remove an useless check
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (12 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 14/68] [media] ivtv: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 16/68] [media] mantis: get rid of warning: no previous prototype Mauro Carvalho Chehab
                   ` (46 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Andy Walls

drivers/media/pci/ivtv/ivtv-ioctl.c: In function 'ivtv_s_input':
drivers/media/pci/ivtv/ivtv-ioctl.c:996:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 31a69eb..7a8b0d0 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -993,7 +993,7 @@ int ivtv_s_input(struct file *file, void *fh, unsigned int inp)
 	v4l2_std_id std;
 	int i;
 
-	if (inp < 0 || inp >= itv->nof_inputs)
+	if (inp >= itv->nof_inputs)
 		return -EINVAL;
 
 	if (inp == itv->active_input) {
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 16/68] [media] mantis: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (13 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 15/68] [media] ivtv-ioctl.c: remove an useless check Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 17/68] [media] saa7164: " Mauro Carvalho Chehab
                   ` (45 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/mantis/mantis_input.c:107:5: warning: no previous prototype for 'mantis_input_init' [-Wmissing-prototypes]
drivers/media/pci/mantis/mantis_input.c:153:5: warning: no previous prototype for 'mantis_exit' [-Wmissing-prototypes]
drivers/media/pci/mantis/mantis_uart.c:64:5: warning: no previous prototype for 'mantis_uart_read' [-Wmissing-prototypes]
drivers/media/pci/mantis/mantis_vp1033.c:118:5: warning: no previous prototype for 'lgtdqcs001f_set_symbol_rate' [-Wmissing-prototypes]
drivers/media/pci/mantis/mantis_vp1033.c:86:5: warning: no previous prototype for 'lgtdqcs001f_tuner_set' [-Wmissing-prototypes]

Note: there is already a mantis_exit at the mantis driver. So,
this should be renamed to mantis_input_exit.

The mantis_input code is currently unused, as it doesn't implement the RC API
right.

Patches for it are sent for discussions, but were never
accepted. So, while this is not fixed, the entire code inside
mantis_input can simply be commented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/mantis/mantis_input.c  | 5 ++++-
 drivers/media/pci/mantis/mantis_uart.c   | 2 +-
 drivers/media/pci/mantis/mantis_vp1033.c | 6 +++---
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/media/pci/mantis/mantis_input.c b/drivers/media/pci/mantis/mantis_input.c
index db6d54d..0e5252e 100644
--- a/drivers/media/pci/mantis/mantis_input.c
+++ b/drivers/media/pci/mantis/mantis_input.c
@@ -18,6 +18,8 @@
 	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#if 0 /* Currently unused */
+
 #include <media/rc-core.h>
 #include <linux/pci.h>
 
@@ -150,10 +152,11 @@ out:
 	return err;
 }
 
-int mantis_exit(struct mantis_pci *mantis)
+int mantis_init_exit(struct mantis_pci *mantis)
 {
 	rc_unregister_device(mantis->rc);
 	rc_map_unregister(&ir_mantis_map);
 	return 0;
 }
 
+#endif
diff --git a/drivers/media/pci/mantis/mantis_uart.c b/drivers/media/pci/mantis/mantis_uart.c
index 85e9778..a707192 100644
--- a/drivers/media/pci/mantis/mantis_uart.c
+++ b/drivers/media/pci/mantis/mantis_uart.c
@@ -61,7 +61,7 @@ static struct {
 
 #define UART_MAX_BUF			16
 
-int mantis_uart_read(struct mantis_pci *mantis, u8 *data)
+static int mantis_uart_read(struct mantis_pci *mantis, u8 *data)
 {
 	struct mantis_hwconfig *config = mantis->hwconfig;
 	u32 stat = 0, i;
diff --git a/drivers/media/pci/mantis/mantis_vp1033.c b/drivers/media/pci/mantis/mantis_vp1033.c
index ad013e9..115003e 100644
--- a/drivers/media/pci/mantis/mantis_vp1033.c
+++ b/drivers/media/pci/mantis/mantis_vp1033.c
@@ -83,7 +83,7 @@ u8 lgtdqcs001f_inittab[] = {
 #define MANTIS_MODEL_NAME	"VP-1033"
 #define MANTIS_DEV_TYPE		"DVB-S/DSS"
 
-int lgtdqcs001f_tuner_set(struct dvb_frontend *fe)
+static int lgtdqcs001f_tuner_set(struct dvb_frontend *fe)
 {
 	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct mantis_pci *mantis	= fe->dvb->priv;
@@ -115,8 +115,8 @@ int lgtdqcs001f_tuner_set(struct dvb_frontend *fe)
 	return 0;
 }
 
-int lgtdqcs001f_set_symbol_rate(struct dvb_frontend *fe,
-				u32 srate, u32 ratio)
+static int lgtdqcs001f_set_symbol_rate(struct dvb_frontend *fe,
+				       u32 srate, u32 ratio)
 {
 	u8 aclk = 0;
 	u8 bclk = 0;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 17/68] [media] saa7164: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (14 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 16/68] [media] mantis: get rid of warning: no previous prototype Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 18/68] [media] radio-aimslab.c: " Mauro Carvalho Chehab
                   ` (44 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/saa7164/saa7164-api.c:1489:5: warning: no previous prototype for 'saa7164_api_modify_gpio' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-api.c:168:5: warning: no previous prototype for 'saa7164_api_set_gop_size' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-api.c:622:5: warning: no previous prototype for 'saa7164_api_set_dif' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-api.c:825:5: warning: no previous prototype for 'saa7164_api_configure_port_vbi' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-api.c:861:5: warning: no previous prototype for 'saa7164_api_configure_port_mpeg2ts' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-api.c:895:5: warning: no previous prototype for 'saa7164_api_configure_port_mpeg2ps' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-api.c:928:5: warning: no previous prototype for 'saa7164_api_dump_subdevs' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-bus.c:109:6: warning: no previous prototype for 'saa7164_bus_dumpmsg' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-bus.c:84:6: warning: no previous prototype for 'saa7164_bus_verify' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:135:5: warning: no previous prototype for 'saa7164_cmd_dequeue' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:189:5: warning: no previous prototype for 'saa7164_cmd_set' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:262:5: warning: no previous prototype for 'saa7164_cmd_wait' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:26:5: warning: no previous prototype for 'saa7164_cmd_alloc_seqno' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:45:6: warning: no previous prototype for 'saa7164_cmd_free_seqno' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:57:6: warning: no previous prototype for 'saa7164_cmd_timeout_seqno' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-cmd.c:67:5: warning: no previous prototype for 'saa7164_cmd_timeout_get' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-encoder.c:1104:29: warning: no previous prototype for 'saa7164_enc_next_buf' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-encoder.c:1290:5: warning: no previous prototype for 'saa7164_g_chip_ident' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-encoder.c:1300:5: warning: no previous prototype for 'saa7164_g_register' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-encoder.c:1313:5: warning: no previous prototype for 'saa7164_s_register' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-fw.c:40:5: warning: no previous prototype for 'saa7164_dl_wait_ack' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-fw.c:56:5: warning: no previous prototype for 'saa7164_dl_wait_clr' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-fw.c:74:5: warning: no previous prototype for 'saa7164_downloadimage' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-vbi.c:1050:29: warning: no previous prototype for 'saa7164_vbi_next_buf' [-Wmissing-prototypes]
drivers/media/pci/saa7164/saa7164-vbi.c:987:5: warning: no previous prototype for 'saa7164_vbi_fmt' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/saa7164/saa7164-api.c     | 26 ++++++++++++++------------
 drivers/media/pci/saa7164/saa7164-bus.c     |  6 +++---
 drivers/media/pci/saa7164/saa7164-cmd.c     | 16 ++++++++--------
 drivers/media/pci/saa7164/saa7164-encoder.c | 15 ++++++++-------
 drivers/media/pci/saa7164/saa7164-fw.c      |  8 ++++----
 drivers/media/pci/saa7164/saa7164-vbi.c     |  6 ++++--
 6 files changed, 41 insertions(+), 36 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-api.c b/drivers/media/pci/saa7164/saa7164-api.c
index eff7135..e042963 100644
--- a/drivers/media/pci/saa7164/saa7164-api.c
+++ b/drivers/media/pci/saa7164/saa7164-api.c
@@ -165,7 +165,7 @@ int saa7164_api_set_vbi_format(struct saa7164_port *port)
 	return ret;
 }
 
-int saa7164_api_set_gop_size(struct saa7164_port *port)
+static int saa7164_api_set_gop_size(struct saa7164_port *port)
 {
 	struct saa7164_dev *dev = port->dev;
 	struct tmComResEncVideoGopStructure gs;
@@ -619,7 +619,7 @@ int saa7164_api_get_videomux(struct saa7164_port *port)
 	return ret;
 }
 
-int saa7164_api_set_dif(struct saa7164_port *port, u8 reg, u8 val)
+static int saa7164_api_set_dif(struct saa7164_port *port, u8 reg, u8 val)
 {
 	struct saa7164_dev *dev = port->dev;
 
@@ -822,8 +822,8 @@ int saa7164_api_read_eeprom(struct saa7164_dev *dev, u8 *buf, int buflen)
 		&reg[0], 128, buf);
 }
 
-int saa7164_api_configure_port_vbi(struct saa7164_dev *dev,
-	struct saa7164_port *port)
+static int saa7164_api_configure_port_vbi(struct saa7164_dev *dev,
+					  struct saa7164_port *port)
 {
 	struct tmComResVBIFormatDescrHeader *fmt = &port->vbi_fmt_ntsc;
 
@@ -858,9 +858,10 @@ int saa7164_api_configure_port_vbi(struct saa7164_dev *dev,
 	return 0;
 }
 
-int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev,
-	struct saa7164_port *port,
-	struct tmComResTSFormatDescrHeader *tsfmt)
+static int
+saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev,
+				   struct saa7164_port *port,
+				   struct tmComResTSFormatDescrHeader *tsfmt)
 {
 	dprintk(DBGLVL_API, "    bFormatIndex = 0x%x\n", tsfmt->bFormatIndex);
 	dprintk(DBGLVL_API, "    bDataOffset  = 0x%x\n", tsfmt->bDataOffset);
@@ -892,9 +893,10 @@ int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev,
 	return 0;
 }
 
-int saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev,
-	struct saa7164_port *port,
-	struct tmComResPSFormatDescrHeader *fmt)
+static int
+saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev,
+				   struct saa7164_port *port,
+				   struct tmComResPSFormatDescrHeader *fmt)
 {
 	dprintk(DBGLVL_API, "    bFormatIndex = 0x%x\n", fmt->bFormatIndex);
 	dprintk(DBGLVL_API, "    wPacketLength= 0x%x\n", fmt->wPacketLength);
@@ -925,7 +927,7 @@ int saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev,
 	return 0;
 }
 
-int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
+static int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
 {
 	struct saa7164_port *tsport = NULL;
 	struct saa7164_port *encport = NULL;
@@ -1486,7 +1488,7 @@ int saa7164_api_i2c_write(struct saa7164_i2c *bus, u8 addr, u32 datalen,
 	return ret == SAA_OK ? 0 : -EIO;
 }
 
-int saa7164_api_modify_gpio(struct saa7164_dev *dev, u8 unitid,
+static int saa7164_api_modify_gpio(struct saa7164_dev *dev, u8 unitid,
 	u8 pin, u8 state)
 {
 	int ret;
diff --git a/drivers/media/pci/saa7164/saa7164-bus.c b/drivers/media/pci/saa7164/saa7164-bus.c
index a7f58a9..5f6f309 100644
--- a/drivers/media/pci/saa7164/saa7164-bus.c
+++ b/drivers/media/pci/saa7164/saa7164-bus.c
@@ -81,7 +81,7 @@ void saa7164_bus_dump(struct saa7164_dev *dev)
 }
 
 /* Intensionally throw a BUG() if the state of the message bus looks corrupt */
-void saa7164_bus_verify(struct saa7164_dev *dev)
+static void saa7164_bus_verify(struct saa7164_dev *dev)
 {
 	struct tmComResBusInfo *b = &dev->bus;
 	int bug = 0;
@@ -106,8 +106,8 @@ void saa7164_bus_verify(struct saa7164_dev *dev)
 	}
 }
 
-void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo* m,
-	void *buf)
+static void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo *m,
+				void *buf)
 {
 	dprintk(DBGLVL_BUS, "Dumping msg structure:\n");
 	dprintk(DBGLVL_BUS, " .id               = %d\n",   m->id);
diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c b/drivers/media/pci/saa7164/saa7164-cmd.c
index 62fac7f..cfabcba 100644
--- a/drivers/media/pci/saa7164/saa7164-cmd.c
+++ b/drivers/media/pci/saa7164/saa7164-cmd.c
@@ -23,7 +23,7 @@
 
 #include "saa7164.h"
 
-int saa7164_cmd_alloc_seqno(struct saa7164_dev *dev)
+static int saa7164_cmd_alloc_seqno(struct saa7164_dev *dev)
 {
 	int i, ret = -1;
 
@@ -42,7 +42,7 @@ int saa7164_cmd_alloc_seqno(struct saa7164_dev *dev)
 	return ret;
 }
 
-void saa7164_cmd_free_seqno(struct saa7164_dev *dev, u8 seqno)
+static void saa7164_cmd_free_seqno(struct saa7164_dev *dev, u8 seqno)
 {
 	mutex_lock(&dev->lock);
 	if ((dev->cmds[seqno].inuse == 1) &&
@@ -54,7 +54,7 @@ void saa7164_cmd_free_seqno(struct saa7164_dev *dev, u8 seqno)
 	mutex_unlock(&dev->lock);
 }
 
-void saa7164_cmd_timeout_seqno(struct saa7164_dev *dev, u8 seqno)
+static void saa7164_cmd_timeout_seqno(struct saa7164_dev *dev, u8 seqno)
 {
 	mutex_lock(&dev->lock);
 	if ((dev->cmds[seqno].inuse == 1) &&
@@ -64,7 +64,7 @@ void saa7164_cmd_timeout_seqno(struct saa7164_dev *dev, u8 seqno)
 	mutex_unlock(&dev->lock);
 }
 
-u32 saa7164_cmd_timeout_get(struct saa7164_dev *dev, u8 seqno)
+static u32 saa7164_cmd_timeout_get(struct saa7164_dev *dev, u8 seqno)
 {
 	int ret = 0;
 
@@ -132,7 +132,7 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev)
 
 /* Commands to the f/w get marshelled to/from this code then onto the PCI
  * -bus/c running buffer. */
-int saa7164_cmd_dequeue(struct saa7164_dev *dev)
+static int saa7164_cmd_dequeue(struct saa7164_dev *dev)
 {
 	int loop = 1;
 	int ret;
@@ -186,8 +186,8 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev)
 	return SAA_OK;
 }
 
-int saa7164_cmd_set(struct saa7164_dev *dev, struct tmComResInfo *msg,
-	void *buf)
+static int saa7164_cmd_set(struct saa7164_dev *dev, struct tmComResInfo *msg,
+			   void *buf)
 {
 	struct tmComResBusInfo *bus = &dev->bus;
 	u8 cmd_sent;
@@ -259,7 +259,7 @@ out:
 /* Wait for a signal event, without holding a mutex. Either return TIMEOUT if
  * the event never occurred, or SAA_OK if it was signaled during the wait.
  */
-int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)
+static int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)
 {
 	wait_queue_head_t *q = NULL;
 	int ret = SAA_BUS_TIMEOUT;
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c
index a9ed686..994018e 100644
--- a/drivers/media/pci/saa7164/saa7164-encoder.c
+++ b/drivers/media/pci/saa7164/saa7164-encoder.c
@@ -1101,7 +1101,8 @@ static int fops_release(struct file *file)
 	return 0;
 }
 
-struct saa7164_user_buffer *saa7164_enc_next_buf(struct saa7164_port *port)
+static struct
+saa7164_user_buffer *saa7164_enc_next_buf(struct saa7164_port *port)
 {
 	struct saa7164_user_buffer *ubuf = NULL;
 	struct saa7164_dev *dev = port->dev;
@@ -1287,8 +1288,8 @@ static const struct v4l2_file_operations mpeg_fops = {
 	.unlocked_ioctl	= video_ioctl2,
 };
 
-int saa7164_g_chip_ident(struct file *file, void *fh,
-	struct v4l2_dbg_chip_ident *chip)
+static int saa7164_g_chip_ident(struct file *file, void *fh,
+				struct v4l2_dbg_chip_ident *chip)
 {
 	struct saa7164_port *port = ((struct saa7164_encoder_fh *)fh)->port;
 	struct saa7164_dev *dev = port->dev;
@@ -1297,8 +1298,8 @@ int saa7164_g_chip_ident(struct file *file, void *fh,
 	return 0;
 }
 
-int saa7164_g_register(struct file *file, void *fh,
-	struct v4l2_dbg_register *reg)
+static int saa7164_g_register(struct file *file, void *fh,
+			      struct v4l2_dbg_register *reg)
 {
 	struct saa7164_port *port = ((struct saa7164_encoder_fh *)fh)->port;
 	struct saa7164_dev *dev = port->dev;
@@ -1310,8 +1311,8 @@ int saa7164_g_register(struct file *file, void *fh,
 	return 0;
 }
 
-int saa7164_s_register(struct file *file, void *fh,
-	struct v4l2_dbg_register *reg)
+static int saa7164_s_register(struct file *file, void *fh,
+			      struct v4l2_dbg_register *reg)
 {
 	struct saa7164_port *port = ((struct saa7164_encoder_fh *)fh)->port;
 	struct saa7164_dev *dev = port->dev;
diff --git a/drivers/media/pci/saa7164/saa7164-fw.c b/drivers/media/pci/saa7164/saa7164-fw.c
index a266bf0..8676320 100644
--- a/drivers/media/pci/saa7164/saa7164-fw.c
+++ b/drivers/media/pci/saa7164/saa7164-fw.c
@@ -37,7 +37,7 @@ struct fw_header {
 	u32	version;
 };
 
-int saa7164_dl_wait_ack(struct saa7164_dev *dev, u32 reg)
+static int saa7164_dl_wait_ack(struct saa7164_dev *dev, u32 reg)
 {
 	u32 timeout = SAA_DEVICE_TIMEOUT;
 	while ((saa7164_readl(reg) & 0x01) == 0) {
@@ -53,7 +53,7 @@ int saa7164_dl_wait_ack(struct saa7164_dev *dev, u32 reg)
 	return 0;
 }
 
-int saa7164_dl_wait_clr(struct saa7164_dev *dev, u32 reg)
+static int saa7164_dl_wait_clr(struct saa7164_dev *dev, u32 reg)
 {
 	u32 timeout = SAA_DEVICE_TIMEOUT;
 	while (saa7164_readl(reg) & 0x01) {
@@ -71,8 +71,8 @@ int saa7164_dl_wait_clr(struct saa7164_dev *dev, u32 reg)
 
 /* TODO: move dlflags into dev-> and change to write/readl/b */
 /* TODO: Excessive levels of debug */
-int saa7164_downloadimage(struct saa7164_dev *dev, u8 *src, u32 srcsize,
-	u32 dlflags, u8 *dst, u32 dstsize)
+static int saa7164_downloadimage(struct saa7164_dev *dev, u8 *src, u32 srcsize,
+				 u32 dlflags, u8 *dst, u32 dstsize)
 {
 	u32 reg, timeout, offset;
 	u8 *srcbuf = NULL;
diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c
index d8e6c8f..b453229 100644
--- a/drivers/media/pci/saa7164/saa7164-vbi.c
+++ b/drivers/media/pci/saa7164/saa7164-vbi.c
@@ -984,7 +984,8 @@ out:
 	return ret;
 }
 
-int saa7164_vbi_fmt(struct file *file, void *priv, struct v4l2_format *f)
+static int saa7164_vbi_fmt(struct file *file, void *priv,
+			   struct v4l2_format *f)
 {
 	/* ntsc */
 	f->fmt.vbi.samples_per_line = 1600;
@@ -1047,7 +1048,8 @@ static int fops_release(struct file *file)
 	return 0;
 }
 
-struct saa7164_user_buffer *saa7164_vbi_next_buf(struct saa7164_port *port)
+static struct
+saa7164_user_buffer *saa7164_vbi_next_buf(struct saa7164_port *port)
 {
 	struct saa7164_user_buffer *ubuf = NULL;
 	struct saa7164_dev *dev = port->dev;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 18/68] [media] radio-aimslab.c: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (15 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 17/68] [media] saa7164: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 19/68] [media] radio-isa: " Mauro Carvalho Chehab
                   ` (43 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/radio/radio-aimslab.c:85:6: warning: no previous prototype for 'rtrack_set_pins' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/radio/radio-aimslab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c
index 12c70e8..a739ad4 100644
--- a/drivers/media/radio/radio-aimslab.c
+++ b/drivers/media/radio/radio-aimslab.c
@@ -82,7 +82,7 @@ static struct radio_isa_card *rtrack_alloc(void)
 #define AIMS_BIT_VOL_UP		(1 << 6)	/* active low */
 #define AIMS_BIT_VOL_DN		(1 << 7)	/* active low */
 
-void rtrack_set_pins(void *handle, u8 pins)
+static void rtrack_set_pins(void *handle, u8 pins)
 {
 	struct radio_isa_card *isa = handle;
 	struct rtrack *rt = container_of(isa, struct rtrack, isa);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 19/68] [media] radio-isa: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (16 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 18/68] [media] radio-aimslab.c: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 20/68] [media] radio-sf16fmi: " Mauro Carvalho Chehab
                   ` (42 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/radio/radio-isa.c:194:24: warning: no previous prototype for 'radio_isa_alloc' [-Wmissing-prototypes]
drivers/media/radio/radio-isa.c:210:5: warning: no previous prototype for 'radio_isa_common_probe' [-Wmissing-prototypes]
drivers/media/radio/radio-isa.c:290:5: warning: no previous prototype for 'radio_isa_common_remove' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/radio/radio-isa.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/radio/radio-isa.c b/drivers/media/radio/radio-isa.c
index 3c0067d..84b7b9f 100644
--- a/drivers/media/radio/radio-isa.c
+++ b/drivers/media/radio/radio-isa.c
@@ -191,7 +191,7 @@ static bool radio_isa_valid_io(const struct radio_isa_driver *drv, int io)
 	return false;
 }
 
-struct radio_isa_card *radio_isa_alloc(struct radio_isa_driver *drv,
+static struct radio_isa_card *radio_isa_alloc(struct radio_isa_driver *drv,
 				struct device *pdev)
 {
 	struct v4l2_device *v4l2_dev;
@@ -207,8 +207,9 @@ struct radio_isa_card *radio_isa_alloc(struct radio_isa_driver *drv,
 	return isa;
 }
 
-int radio_isa_common_probe(struct radio_isa_card *isa, struct device *pdev,
-				int radio_nr, unsigned region_size)
+static int radio_isa_common_probe(struct radio_isa_card *isa,
+				  struct device *pdev,
+				  int radio_nr, unsigned region_size)
 {
 	const struct radio_isa_driver *drv = isa->drv;
 	const struct radio_isa_ops *ops = drv->ops;
@@ -287,7 +288,8 @@ err_dev_reg:
 	return res;
 }
 
-int radio_isa_common_remove(struct radio_isa_card *isa, unsigned region_size)
+static int radio_isa_common_remove(struct radio_isa_card *isa,
+				   unsigned region_size)
 {
 	const struct radio_isa_ops *ops = isa->drv->ops;
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 20/68] [media] radio-sf16fmi: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (17 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 19/68] [media] radio-isa: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 22/68] [media] ite-cir.c: " Mauro Carvalho Chehab
                   ` (41 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/radio/radio-sf16fmi.c:67:6: warning: no previous prototype for 'fmi_set_pins' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/radio/radio-sf16fmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c
index 227dcdb..c260a2a 100644
--- a/drivers/media/radio/radio-sf16fmi.c
+++ b/drivers/media/radio/radio-sf16fmi.c
@@ -64,7 +64,7 @@ bool pnp_attached;
 #define FMI_BIT_VOL_SW		(1 << 3)
 #define FMI_BIT_TUN_STRQ	(1 << 4)
 
-void fmi_set_pins(void *handle, u8 pins)
+static void fmi_set_pins(void *handle, u8 pins)
 {
 	struct fmi *fmi = handle;
 	u8 bits = FMI_BIT_TUN_STRQ;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 22/68] [media] ite-cir.c: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (18 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 20/68] [media] radio-sf16fmi: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 23/68] [media] nuvoton-cir: " Mauro Carvalho Chehab
                   ` (40 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/rc/ite-cir.c:1711:5: warning: no previous prototype for 'ite_init' [-Wmissing-prototypes]
drivers/media/rc/ite-cir.c:1716:6: warning: no previous prototype for 'ite_exit' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/rc/ite-cir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index d635115..5e5a7f2 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1708,12 +1708,12 @@ static struct pnp_driver ite_driver = {
 	.shutdown	= ite_shutdown,
 };
 
-int ite_init(void)
+static int ite_init(void)
 {
 	return pnp_register_driver(&ite_driver);
 }
 
-void ite_exit(void)
+static void ite_exit(void)
 {
 	pnp_unregister_driver(&ite_driver);
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 23/68] [media] nuvoton-cir: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (19 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 22/68] [media] ite-cir.c: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 24/68] [media] nuvoton-cir: carrier detect support is broken - remove it Mauro Carvalho Chehab
                   ` (39 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/rc/nuvoton-cir.c:1223:5: warning: no previous prototype for 'nvt_init' [-Wmissing-prototypes]
drivers/media/rc/nuvoton-cir.c:1228:6: warning: no previous prototype for 'nvt_exit' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/rc/nuvoton-cir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 0190dfc..44ba834 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1220,12 +1220,12 @@ static struct pnp_driver nvt_driver = {
 	.shutdown	= nvt_shutdown,
 };
 
-int nvt_init(void)
+static int nvt_init(void)
 {
 	return pnp_register_driver(&nvt_driver);
 }
 
-void nvt_exit(void)
+static void nvt_exit(void)
 {
 	pnp_unregister_driver(&nvt_driver);
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 24/68] [media] nuvoton-cir: carrier detect support is broken - remove it
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (20 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 23/68] [media] nuvoton-cir: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 25/68] [media] max2165: get rid of warning: no previous prototype Mauro Carvalho Chehab
                   ` (38 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

The carrier detect return value is never used on nuvoton driver:
drivers/media/rc/nuvoton-cir.c: In function 'nvt_process_rx_ir_data':
drivers/media/rc/nuvoton-cir.c:623:6: warning: variable 'carrier' set but not used [-Wunused-but-set-variable]
Also, this would be called only if a boolean variable is enabled,
but there's no condition that enables it inside the driver. So,
comment the carrier detection code, as it might be useful later,
and remove the unused glue code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/rc/nuvoton-cir.c | 7 ++-----
 drivers/media/rc/nuvoton-cir.h | 1 -
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 44ba834..e4ea89a 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -472,6 +472,7 @@ static void nvt_enable_wake(struct nvt_dev *nvt)
 	nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN);
 }
 
+#if 0 /* Currently unused */
 /* rx carrier detect only works in learning mode, must be called w/nvt_lock */
 static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)
 {
@@ -504,7 +505,7 @@ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)
 
 	return carrier;
 }
-
+#endif
 /*
  * set carrier frequency
  *
@@ -620,7 +621,6 @@ static void nvt_dump_rx_buf(struct nvt_dev *nvt)
 static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
 {
 	DEFINE_IR_RAW_EVENT(rawir);
-	u32 carrier;
 	u8 sample;
 	int i;
 
@@ -629,9 +629,6 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
 	if (debug)
 		nvt_dump_rx_buf(nvt);
 
-	if (nvt->carrier_detect_enabled)
-		carrier = nvt_rx_carrier_detect(nvt);
-
 	nvt_dbg_verbose("Processing buffer of len %d", nvt->pkts);
 
 	init_ir_raw_event(&rawir);
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 0d5e087..7c3674f 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -103,7 +103,6 @@ struct nvt_dev {
 
 	/* rx settings */
 	bool learning_enabled;
-	bool carrier_detect_enabled;
 
 	/* track cir wake state */
 	u8 wake_state;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 25/68] [media] max2165: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (21 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 24/68] [media] nuvoton-cir: carrier detect support is broken - remove it Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 26/68] [media] au0828: " Mauro Carvalho Chehab
                   ` (37 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/tuners/max2165.c:164:5: warning: no previous prototype for 'fixpt_div32' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/tuners/max2165.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/tuners/max2165.c b/drivers/media/tuners/max2165.c
index ba84936..95ed46f 100644
--- a/drivers/media/tuners/max2165.c
+++ b/drivers/media/tuners/max2165.c
@@ -161,7 +161,7 @@ static int max2165_set_bandwidth(struct max2165_priv *priv, u32 bw)
 	return 0;
 }
 
-int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction)
+static int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction)
 {
 	u32 remainder;
 	u32 q, f = 0;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 26/68] [media] au0828: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (22 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 25/68] [media] max2165: get rid of warning: no previous prototype Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 27/68] [media] cx231xx: " Mauro Carvalho Chehab
                   ` (36 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/au0828/au0828-cards.c:28:6: warning: no previous prototype for 'hvr950q_cs5340_audio' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:161:6: warning: no previous prototype for 'au0828_uninit_isoc' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:200:5: warning: no previous prototype for 'au0828_init_isoc' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:786:5: warning: no previous prototype for 'au0828_analog_stream_enable' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:813:6: warning: no previous prototype for 'au0828_analog_stream_reset' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:916:6: warning: no previous prototype for 'au0828_vid_buffer_timeout' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:940:6: warning: no previous prototype for 'au0828_vbi_buffer_timeout' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/au0828/au0828-cards.c |  2 +-
 drivers/media/usb/au0828/au0828-video.c | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-cards.c b/drivers/media/usb/au0828/au0828-cards.c
index 448361c..0cb7c28 100644
--- a/drivers/media/usb/au0828/au0828-cards.c
+++ b/drivers/media/usb/au0828/au0828-cards.c
@@ -25,7 +25,7 @@
 #include "media/tuner.h"
 #include "media/v4l2-common.h"
 
-void hvr950q_cs5340_audio(void *priv, int enable)
+static void hvr950q_cs5340_audio(void *priv, int enable)
 {
 	/* Because the HVR-950q shares an i2s bus between the cs5340 and the
 	   au8522, we need to hold cs5340 in reset when using the au8522 */
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index 8705855..45387aa 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -158,7 +158,7 @@ static void au0828_irq_callback(struct urb *urb)
 /*
  * Stop and Deallocate URBs
  */
-void au0828_uninit_isoc(struct au0828_dev *dev)
+static void au0828_uninit_isoc(struct au0828_dev *dev)
 {
 	struct urb *urb;
 	int i;
@@ -197,9 +197,9 @@ void au0828_uninit_isoc(struct au0828_dev *dev)
 /*
  * Allocate URBs and start IRQ
  */
-int au0828_init_isoc(struct au0828_dev *dev, int max_packets,
-		     int num_bufs, int max_pkt_size,
-		     int (*isoc_copy) (struct au0828_dev *dev, struct urb *urb))
+static int au0828_init_isoc(struct au0828_dev *dev, int max_packets,
+			    int num_bufs, int max_pkt_size,
+			    int (*isoc_copy) (struct au0828_dev *dev, struct urb *urb))
 {
 	struct au0828_dmaqueue *dma_q = &dev->vidq;
 	int i;
@@ -783,7 +783,7 @@ static int au0828_i2s_init(struct au0828_dev *dev)
  * Auvitek au0828 analog stream enable
  * Please set interface0 to AS5 before enable the stream
  */
-int au0828_analog_stream_enable(struct au0828_dev *d)
+static int au0828_analog_stream_enable(struct au0828_dev *d)
 {
 	dprintk(1, "au0828_analog_stream_enable called\n");
 	au0828_writereg(d, AU0828_SENSORCTRL_VBI_103, 0x00);
@@ -810,7 +810,7 @@ int au0828_analog_stream_disable(struct au0828_dev *d)
 	return 0;
 }
 
-void au0828_analog_stream_reset(struct au0828_dev *dev)
+static void au0828_analog_stream_reset(struct au0828_dev *dev)
 {
 	dprintk(1, "au0828_analog_stream_reset called\n");
 	au0828_writereg(dev, AU0828_SENSORCTRL_100, 0x0);
@@ -913,7 +913,7 @@ static int get_ressource(struct au0828_fh *fh)
 /* This function ensures that video frames continue to be delivered even if
    the ITU-656 input isn't receiving any data (thereby preventing applications
    such as tvtime from hanging) */
-void au0828_vid_buffer_timeout(unsigned long data)
+static void au0828_vid_buffer_timeout(unsigned long data)
 {
 	struct au0828_dev *dev = (struct au0828_dev *) data;
 	struct au0828_dmaqueue *dma_q = &dev->vidq;
@@ -937,7 +937,7 @@ void au0828_vid_buffer_timeout(unsigned long data)
 	spin_unlock_irqrestore(&dev->slock, flags);
 }
 
-void au0828_vbi_buffer_timeout(unsigned long data)
+static void au0828_vbi_buffer_timeout(unsigned long data)
 {
 	struct au0828_dev *dev = (struct au0828_dev *) data;
 	struct au0828_dmaqueue *dma_q = &dev->vbiq;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 27/68] [media] cx231xx: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (23 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 26/68] [media] au0828: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 28/68] [media] cx231xx-avcore: get rid of a sophisticated do-nothing code Mauro Carvalho Chehab
                   ` (35 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/cx231xx/cx231xx-avcore.c:1071:5: warning: no previous prototype for 'stopAudioFirmware' [-Wmissing-prototypes]
drivers/media/usb/cx231xx/cx231xx-avcore.c:1076:5: warning: no previous prototype for 'restartAudioFirmware' [-Wmissing-prototypes]
drivers/media/usb/cx231xx/cx231xx-cards.c:689:6: warning: no previous prototype for 'cx231xx_reset_out' [-Wmissing-prototypes]
drivers/media/usb/cx231xx/cx231xx-cards.c:697:6: warning: no previous prototype for 'cx231xx_enable_OSC' [-Wmissing-prototypes]
drivers/media/usb/cx231xx/cx231xx-cards.c:701:6: warning: no previous prototype for 'cx231xx_sleep_s5h1432' [-Wmissing-prototypes]
drivers/media/usb/cx231xx/cx231xx-i2c.c:75:5: warning: no previous prototype for 'cx231xx_i2c_send_bytes' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/cx231xx/cx231xx-avcore.c | 4 ++--
 drivers/media/usb/cx231xx/cx231xx-cards.c  | 8 +++++---
 drivers/media/usb/cx231xx/cx231xx-i2c.c    | 4 ++--
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
index 447148e..d34dbcf 100644
--- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
@@ -1068,12 +1068,12 @@ int cx231xx_unmute_audio(struct cx231xx *dev)
 }
 EXPORT_SYMBOL_GPL(cx231xx_unmute_audio);
 
-int stopAudioFirmware(struct cx231xx *dev)
+static int stopAudioFirmware(struct cx231xx *dev)
 {
 	return vid_blk_write_byte(dev, DL_CTL_CONTROL, 0x03);
 }
 
-int restartAudioFirmware(struct cx231xx *dev)
+static int restartAudioFirmware(struct cx231xx *dev)
 {
 	return vid_blk_write_byte(dev, DL_CTL_CONTROL, 0x13);
 }
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index b84ebc5..bbed1e4 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -686,7 +686,7 @@ int cx231xx_tuner_callback(void *ptr, int component, int command, int arg)
 }
 EXPORT_SYMBOL_GPL(cx231xx_tuner_callback);
 
-void cx231xx_reset_out(struct cx231xx *dev)
+static void cx231xx_reset_out(struct cx231xx *dev)
 {
 	cx231xx_set_gpio_value(dev, CX23417_RESET, 1);
 	msleep(200);
@@ -694,11 +694,13 @@ void cx231xx_reset_out(struct cx231xx *dev)
 	msleep(200);
 	cx231xx_set_gpio_value(dev, CX23417_RESET, 1);
 }
-void cx231xx_enable_OSC(struct cx231xx *dev)
+
+static void cx231xx_enable_OSC(struct cx231xx *dev)
 {
 	cx231xx_set_gpio_value(dev, CX23417_OSC_EN, 1);
 }
-void cx231xx_sleep_s5h1432(struct cx231xx *dev)
+
+static void cx231xx_sleep_s5h1432(struct cx231xx *dev)
 {
 	cx231xx_set_gpio_value(dev, SLEEP_S5H1432, 0);
 }
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
index 781feed..96a5a09 100644
--- a/drivers/media/usb/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c
@@ -72,8 +72,8 @@ static inline bool is_tuner(struct cx231xx *dev, struct cx231xx_i2c *bus,
 /*
  * cx231xx_i2c_send_bytes()
  */
-int cx231xx_i2c_send_bytes(struct i2c_adapter *i2c_adap,
-			   const struct i2c_msg *msg)
+static int cx231xx_i2c_send_bytes(struct i2c_adapter *i2c_adap,
+				  const struct i2c_msg *msg)
 {
 	struct cx231xx_i2c *bus = i2c_adap->algo_data;
 	struct cx231xx *dev = bus->dev;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 28/68] [media] cx231xx-avcore: get rid of a sophisticated do-nothing code
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (24 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 27/68] [media] cx231xx: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 29/68] [media] az6027: get rid of warning: no previous prototype Mauro Carvalho Chehab
                   ` (34 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/cx231xx/cx231xx-avcore.c: In function 'cx231xx_capture_start':
drivers/media/usb/cx231xx/cx231xx-avcore.c:2637:3: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/cx231xx/cx231xx-avcore.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
index d34dbcf..7222079 100644
--- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
@@ -2631,11 +2631,6 @@ int cx231xx_capture_start(struct cx231xx *dev, int start, u8 media_type)
 			rc = cx231xx_stop_stream(dev, ep_mask);
 	}
 
-	if (dev->mode == CX231XX_ANALOG_MODE)
-		;/* do any in Analog mode */
-	else
-		;/* do any in digital mode */
-
 	return rc;
 }
 EXPORT_SYMBOL_GPL(cx231xx_capture_start);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 29/68] [media] az6027: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (25 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 28/68] [media] cx231xx-avcore: get rid of a sophisticated do-nothing code Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 31/68] [media] lmedm04: " Mauro Carvalho Chehab
                   ` (33 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/dvb-usb/az6027.c:1054:5: warning: no previous prototype for 'az6027_identify_state' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb/az6027.c:301:5: warning: no previous prototype for 'az6027_usb_in_op' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/dvb-usb/az6027.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/az6027.c b/drivers/media/usb/dvb-usb/az6027.c
index 5e45ae6..91e0119 100644
--- a/drivers/media/usb/dvb-usb/az6027.c
+++ b/drivers/media/usb/dvb-usb/az6027.c
@@ -298,7 +298,8 @@ struct stb6100_config az6027_stb6100_config = {
 
 
 /* check for mutex FIXME */
-int az6027_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
+static int az6027_usb_in_op(struct dvb_usb_device *d, u8 req,
+			    u16 value, u16 index, u8 *b, int blen)
 {
 	int ret = -1;
 	if (mutex_lock_interruptible(&d->usb_mutex))
@@ -1051,10 +1052,10 @@ static struct i2c_algorithm az6027_i2c_algo = {
 	.functionality = az6027_i2c_func,
 };
 
-int az6027_identify_state(struct usb_device *udev,
-			  struct dvb_usb_device_properties *props,
-			  struct dvb_usb_device_description **desc,
-			  int *cold)
+static int az6027_identify_state(struct usb_device *udev,
+				 struct dvb_usb_device_properties *props,
+				 struct dvb_usb_device_description **desc,
+				 int *cold)
 {
 	u8 *b;
 	s16 ret;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 31/68] [media] lmedm04: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (26 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 29/68] [media] az6027: get rid of warning: no previous prototype Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 32/68] [media] vp702x: " Mauro Carvalho Chehab
                   ` (32 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/dvb-usb-v2/lmedm04.c:802:13: warning: no previous prototype for 'lme_firmware_switch' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 6a2445b..6427ac3 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -799,7 +799,7 @@ static const char fw_c_rs2000[] = LME2510_C_RS2000;
 static const char fw_lg[] = LME2510_LG;
 static const char fw_s0194[] = LME2510_S0194;
 
-const char *lme_firmware_switch(struct dvb_usb_device *d, int cold)
+static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold)
 {
 	struct lme2510_state *st = d->priv;
 	struct usb_device *udev = d->udev;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 32/68] [media] vp702x: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (27 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 31/68] [media] lmedm04: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 33/68] [media] pvrusb2: " Mauro Carvalho Chehab
                   ` (31 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/dvb-usb/vp702x.c:70:5: warning: no previous prototype for 'vp702x_usb_out_op_unlocked' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb/vp702x.c:89:5: warning: no previous prototype for 'vp702x_usb_out_op' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/dvb-usb/vp702x.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/vp702x.c b/drivers/media/usb/dvb-usb/vp702x.c
index 07c673a..22cf9f9 100644
--- a/drivers/media/usb/dvb-usb/vp702x.c
+++ b/drivers/media/usb/dvb-usb/vp702x.c
@@ -56,7 +56,7 @@ static int vp702x_usb_in_op_unlocked(struct dvb_usb_device *d, u8 req,
 }
 
 int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value,
-			    u16 index, u8 *b, int blen)
+		     u16 index, u8 *b, int blen)
 {
 	int ret;
 
@@ -67,8 +67,8 @@ int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value,
 	return ret;
 }
 
-int vp702x_usb_out_op_unlocked(struct dvb_usb_device *d, u8 req, u16 value,
-				      u16 index, u8 *b, int blen)
+static int vp702x_usb_out_op_unlocked(struct dvb_usb_device *d, u8 req,
+				      u16 value, u16 index, u8 *b, int blen)
 {
 	int ret;
 	deb_xfer("out: req. %02x, val: %04x, ind: %04x, buffer: ",req,value,index);
@@ -86,7 +86,7 @@ int vp702x_usb_out_op_unlocked(struct dvb_usb_device *d, u8 req, u16 value,
 		return 0;
 }
 
-int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
+static int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
 			     u16 index, u8 *b, int blen)
 {
 	int ret;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 33/68] [media] pvrusb2: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (28 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 32/68] [media] vp702x: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 34/68] [media] pwc-if: " Mauro Carvalho Chehab
                   ` (30 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Mike Isely

drivers/media/usb/pvrusb2/pvrusb2-v4l2.c:199:5: warning: no previous prototype for 'pvr2_s_std' [-Wmissing-prototypes]
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c:368:5: warning: no previous prototype for 'pvr2_s_frequency' [-Wmissing-prototypes]

Cc: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
index db249ca..6930676 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
@@ -196,7 +196,7 @@ static int pvr2_g_std(struct file *file, void *priv, v4l2_std_id *std)
 	return ret;
 }
 
-int pvr2_s_std(struct file *file, void *priv, v4l2_std_id *std)
+static int pvr2_s_std(struct file *file, void *priv, v4l2_std_id *std)
 {
 	struct pvr2_v4l2_fh *fh = file->private_data;
 	struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
@@ -365,7 +365,7 @@ static int pvr2_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
 			vt->audmode);
 }
 
-int pvr2_s_frequency(struct file *file, void *priv, struct v4l2_frequency *vf)
+static int pvr2_s_frequency(struct file *file, void *priv, struct v4l2_frequency *vf)
 {
 	struct pvr2_v4l2_fh *fh = file->private_data;
 	struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 34/68] [media] pwc-if: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (29 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 33/68] [media] pvrusb2: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success Mauro Carvalho Chehab
                   ` (29 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/pwc/pwc-if.c:158:23: warning: no previous prototype for 'pwc_get_next_fill_buf' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/pwc/pwc-if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index 42e36ba..e191572 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -155,7 +155,7 @@ static struct video_device pwc_template = {
 /***************************************************************************/
 /* Private functions */
 
-struct pwc_frame_buf *pwc_get_next_fill_buf(struct pwc_device *pdev)
+static struct pwc_frame_buf *pwc_get_next_fill_buf(struct pwc_device *pdev)
 {
 	unsigned long flags = 0;
 	struct pwc_frame_buf *buf = NULL;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (30 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 34/68] [media] pwc-if: " Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-29 11:37   ` Ezequiel Garcia
  2012-10-27 20:40 ` [PATCH 36/68] [media] dib9000: get rid of warning: no previous prototype Mauro Carvalho Chehab
                   ` (28 subsequent siblings)
  60 siblings, 1 reply; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe':
drivers/media/usb/pwc/pwc-if.c:1003:16: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]
In the past, it used to have a logic there at queue init that would
BUG() on errors. This logic got removed. Drivers are now required
to explicitly handle the queue initialization errors, or very bad
things may happen.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/pwc/pwc-if.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index e191572..5210239 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -1000,7 +1000,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 	pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
 	pdev->vb_queue.ops = &pwc_vb_queue_ops;
 	pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
-	vb2_queue_init(&pdev->vb_queue);
+	rc = vb2_queue_init(&pdev->vb_queue);
+	if (rc < 0) {
+		PWC_ERROR("Oops, could not initialize vb2 queue.\n");
+		goto err_free_mem;
+	}
 
 	/* Init video_device structure */
 	memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 36/68] [media] dib9000: get rid of warning: no previous prototype
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (31 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 37/68] [media] gscpa: get rid of warning: suggest braces around empty body Mauro Carvalho Chehab
                   ` (27 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/dib9000.h:100:5: warning: no previous prototype for 'dib9000_remove_slave_frontend' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/dib9000.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/dib9000.h b/drivers/media/dvb-frontends/dib9000.h
index b5781a4..de1cc91 100644
--- a/drivers/media/dvb-frontends/dib9000.h
+++ b/drivers/media/dvb-frontends/dib9000.h
@@ -97,7 +97,7 @@ static inline int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct dvb
 	return -ENODEV;
 }
 
-int dib9000_remove_slave_frontend(struct dvb_frontend *fe)
+static inline int dib9000_remove_slave_frontend(struct dvb_frontend *fe)
 {
 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
 	return -ENODEV;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 37/68] [media] gscpa: get rid of warning: suggest braces around empty body
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (32 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 36/68] [media] dib9000: get rid of warning: no previous prototype Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 38/68] [media] jeilinj: fix return of the response code Mauro Carvalho Chehab
                   ` (26 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Hans de Goede

There are hundreds of messages like this one, when GSPCA debug is
disabled, when compiled with W=1:
drivers/media/usb/gspca/spca500.c:725:46: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
Get rid of it, especially as it might actually cause troubles on
some places.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/gspca/gspca.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h
index e3eab82..352317d 100644
--- a/drivers/media/usb/gspca/gspca.h
+++ b/drivers/media/usb/gspca/gspca.h
@@ -32,7 +32,7 @@ do {								\
 #define D_USBO 0x00
 #define D_V4L2 0x0100
 #else
-#define PDEBUG(level, fmt, ...)
+#define PDEBUG(level, fmt, ...) do {} while(0)
 #endif
 
 #define GSPCA_MAX_FRAMES 16	/* maximum number of video frame buffers */
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 38/68] [media] jeilinj: fix return of the response code
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (33 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 37/68] [media] gscpa: get rid of warning: suggest braces around empty body Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 39/68] [media] gspca: warning fix: index is unsigned, so it will never be below 0 Mauro Carvalho Chehab
                   ` (25 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Hans de Goede

drivers/media/usb/gspca/jeilinj.c: In function 'jlj_read1':
drivers/media/usb/gspca/jeilinj.c:117:66: warning: parameter 'response' set but not used [-Wunused-but-set-parameter]
The code still doesn't make much sense, as response is never tested
there.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/gspca/jeilinj.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/gspca/jeilinj.c b/drivers/media/usb/gspca/jeilinj.c
index b897aa8..1ba29fe 100644
--- a/drivers/media/usb/gspca/jeilinj.c
+++ b/drivers/media/usb/gspca/jeilinj.c
@@ -114,7 +114,7 @@ static void jlj_write2(struct gspca_dev *gspca_dev, unsigned char *command)
 }
 
 /* Responses are one byte only */
-static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char response)
+static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char *response)
 {
 	int retval;
 
@@ -123,7 +123,7 @@ static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char response)
 	retval = usb_bulk_msg(gspca_dev->dev,
 	usb_rcvbulkpipe(gspca_dev->dev, 0x84),
 				gspca_dev->usb_buf, 1, NULL, 500);
-	response = gspca_dev->usb_buf[0];
+	*response = gspca_dev->usb_buf[0];
 	if (retval < 0) {
 		pr_err("read command [%02x] error %d\n",
 		       gspca_dev->usb_buf[0], retval);
@@ -260,7 +260,7 @@ static int jlj_start(struct gspca_dev *gspca_dev)
 		if (start_commands[i].delay)
 			msleep(start_commands[i].delay);
 		if (start_commands[i].ack_wanted)
-			jlj_read1(gspca_dev, response);
+			jlj_read1(gspca_dev, &response);
 	}
 	setcamquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
 	msleep(2);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 39/68] [media] gspca: warning fix: index is unsigned, so it will never be below 0
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (34 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 38/68] [media] jeilinj: fix return of the response code Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 40/68] [media] dt3155v4l: vb2_queue_init() can now fail. Check is required Mauro Carvalho Chehab
                   ` (24 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Hans de Goede

drivers/media/usb/gspca/gspca.c: In function 'vidioc_querybuf':
drivers/media/usb/gspca/gspca.c:1590:6: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/gspca/gspca.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
index a2b9341..e0a431b 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -1586,8 +1586,7 @@ static int vidioc_querybuf(struct file *file, void *priv,
 	struct gspca_dev *gspca_dev = video_drvdata(file);
 	struct gspca_frame *frame;
 
-	if (v4l2_buf->index < 0
-	    || v4l2_buf->index >= gspca_dev->nframes)
+	if (v4l2_buf->index >= gspca_dev->nframes)
 		return -EINVAL;
 
 	frame = &gspca_dev->frame[v4l2_buf->index];
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 40/68] [media] dt3155v4l: vb2_queue_init() can now fail. Check is required
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (35 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 39/68] [media] gspca: warning fix: index is unsigned, so it will never be below 0 Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:40 ` [PATCH 41/68] [media] go7007-v4l2: warning fix: index is unsigned, so it will never be below 0 Mauro Carvalho Chehab
                   ` (23 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/staging/media/dt3155v4l/dt3155v4l.c: In function 'dt3155_open':
drivers/staging/media/dt3155v4l/dt3155v4l.c:399:17: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/staging/media/dt3155v4l/dt3155v4l.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c
index 2e7b711..54f1813 100644
--- a/drivers/staging/media/dt3155v4l/dt3155v4l.c
+++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c
@@ -396,7 +396,9 @@ dt3155_open(struct file *filp)
 		pd->q->drv_priv = pd;
 		pd->curr_buf = NULL;
 		pd->field_count = 0;
-		vb2_queue_init(pd->q); /* cannot fail */
+		ret = vb2_queue_init(pd->q);
+		if (ret < 0)
+			return ret;
 		INIT_LIST_HEAD(&pd->dmaq);
 		spin_lock_init(&pd->lock);
 		/* disable all irqs, clear all irq flags */
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 41/68] [media] go7007-v4l2: warning fix: index is unsigned, so it will never be below 0
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (36 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 40/68] [media] dt3155v4l: vb2_queue_init() can now fail. Check is required Mauro Carvalho Chehab
@ 2012-10-27 20:40 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 42/68] [media] dvb_frontend: Don't declare values twice at a table Mauro Carvalho Chehab
                   ` (22 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:40 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/staging/media/go7007/go7007-v4l2.c: In function 'vidioc_qbuf':
drivers/staging/media/go7007/go7007-v4l2.c:815:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/staging/media/go7007/go7007-v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c
index 980371b..a78133b 100644
--- a/drivers/staging/media/go7007/go7007-v4l2.c
+++ b/drivers/staging/media/go7007/go7007-v4l2.c
@@ -812,7 +812,7 @@ static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
 		return retval;
 
 	mutex_lock(&gofh->lock);
-	if (buf->index < 0 || buf->index >= gofh->buf_count)
+	if (buf->index >= gofh->buf_count)
 		goto unlock_and_return;
 
 	gobuf = &gofh->bufs[buf->index];
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 42/68] [media] dvb_frontend: Don't declare values twice at a table
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (37 preceding siblings ...)
  2012-10-27 20:40 ` [PATCH 41/68] [media] go7007-v4l2: warning fix: index is unsigned, so it will never be below 0 Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 43/68] [media] cx88: reorder inline to prevent a gcc warning Mauro Carvalho Chehab
                   ` (21 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-core/dvb_frontend.c:1032:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1032:2: warning: (near initialization for 'dtv_cmds[36]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1033:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1033:2: warning: (near initialization for 'dtv_cmds[37]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1034:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1034:2: warning: (near initialization for 'dtv_cmds[38]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1035:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1035:2: warning: (near initialization for 'dtv_cmds[39]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1036:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1036:2: warning: (near initialization for 'dtv_cmds[40]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1037:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1037:2: warning: (near initialization for 'dtv_cmds[60]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1045:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1045:2: warning: (near initialization for 'dtv_cmds[46]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1051:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1051:2: warning: (near initialization for 'dtv_cmds[52]') [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1060:2: warning: initialized field overwritten [-Woverride-init]
drivers/media/dvb-core/dvb_frontend.c:1060:2: warning: (near initialization for 'dtv_cmds[61]') [-Woverride-init]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-core/dvb_frontend.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 7e92793..49d9504 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -1029,12 +1029,6 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {
 	/* Get */
 	_DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1),
 	_DTV_CMD(DTV_API_VERSION, 0, 0),
-	_DTV_CMD(DTV_CODE_RATE_HP, 0, 0),
-	_DTV_CMD(DTV_CODE_RATE_LP, 0, 0),
-	_DTV_CMD(DTV_GUARD_INTERVAL, 0, 0),
-	_DTV_CMD(DTV_TRANSMISSION_MODE, 0, 0),
-	_DTV_CMD(DTV_HIERARCHY, 0, 0),
-	_DTV_CMD(DTV_INTERLEAVING, 0, 0),
 
 	_DTV_CMD(DTV_ENUM_DELSYS, 0, 0),
 
@@ -1042,13 +1036,11 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {
 	_DTV_CMD(DTV_ATSCMH_RS_FRAME_ENSEMBLE, 1, 0),
 
 	_DTV_CMD(DTV_ATSCMH_FIC_VER, 0, 0),
-	_DTV_CMD(DTV_ATSCMH_PARADE_ID, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_NOG, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_TNOG, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_SGN, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_PRC, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_RS_FRAME_MODE, 0, 0),
-	_DTV_CMD(DTV_ATSCMH_RS_FRAME_ENSEMBLE, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_RS_CODE_MODE_PRI, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_RS_CODE_MODE_SEC, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_SCCC_BLOCK_MODE, 0, 0),
@@ -1056,8 +1048,6 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {
 	_DTV_CMD(DTV_ATSCMH_SCCC_CODE_MODE_B, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_SCCC_CODE_MODE_C, 0, 0),
 	_DTV_CMD(DTV_ATSCMH_SCCC_CODE_MODE_D, 0, 0),
-
-	_DTV_CMD(DTV_LNA, 0, 0),
 };
 
 static void dtv_property_dump(struct dvb_frontend *fe, struct dtv_property *tvp)
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 43/68] [media] cx88: reorder inline to prevent a gcc warning
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (38 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 42/68] [media] dvb_frontend: Don't declare values twice at a table Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 44/68] [media] cx88: get rid of a warning at dprintk() macro Mauro Carvalho Chehab
                   ` (20 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/cx88/cx88.h:97:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88.h:103:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:649:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:654:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:659:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:664:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:684:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:695:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/cx88/cx88-core.c | 12 ++++++------
 drivers/media/pci/cx88/cx88.h      |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c
index c97b174..19a5875 100644
--- a/drivers/media/pci/cx88/cx88-core.c
+++ b/drivers/media/pci/cx88/cx88-core.c
@@ -646,22 +646,22 @@ int cx88_reset(struct cx88_core *core)
 
 /* ------------------------------------------------------------------ */
 
-static unsigned int inline norm_swidth(v4l2_std_id norm)
+static inline unsigned int norm_swidth(v4l2_std_id norm)
 {
 	return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 754 : 922;
 }
 
-static unsigned int inline norm_hdelay(v4l2_std_id norm)
+static inline unsigned int norm_hdelay(v4l2_std_id norm)
 {
 	return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 135 : 186;
 }
 
-static unsigned int inline norm_vdelay(v4l2_std_id norm)
+static inline unsigned int norm_vdelay(v4l2_std_id norm)
 {
 	return (norm & V4L2_STD_625_50) ? 0x24 : 0x18;
 }
 
-static unsigned int inline norm_fsc8(v4l2_std_id norm)
+static inline unsigned int norm_fsc8(v4l2_std_id norm)
 {
 	if (norm & V4L2_STD_PAL_M)
 		return 28604892;      // 3.575611 MHz
@@ -681,7 +681,7 @@ static unsigned int inline norm_fsc8(v4l2_std_id norm)
 	return 35468950;      // 4.43361875 MHz +/- 5 Hz
 }
 
-static unsigned int inline norm_htotal(v4l2_std_id norm)
+static inline unsigned int norm_htotal(v4l2_std_id norm)
 {
 
 	unsigned int fsc4=norm_fsc8(norm)/2;
@@ -692,7 +692,7 @@ static unsigned int inline norm_htotal(v4l2_std_id norm)
 				((fsc4+262)/525*1001+15000)/30000;
 }
 
-static unsigned int inline norm_vbipack(v4l2_std_id norm)
+static inline unsigned int norm_vbipack(v4l2_std_id norm)
 {
 	return (norm & V4L2_STD_625_50) ? 511 : 400;
 }
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h
index 44ffc8b..ba0dba4 100644
--- a/drivers/media/pci/cx88/cx88.h
+++ b/drivers/media/pci/cx88/cx88.h
@@ -94,13 +94,13 @@ enum cx8802_board_access {
 /* ----------------------------------------------------------- */
 /* tv norms                                                    */
 
-static unsigned int inline norm_maxw(v4l2_std_id norm)
+static inline unsigned int norm_maxw(v4l2_std_id norm)
 {
 	return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768;
 }
 
 
-static unsigned int inline norm_maxh(v4l2_std_id norm)
+static inline unsigned int norm_maxh(v4l2_std_id norm)
 {
 	return (norm & V4L2_STD_625_50) ? 576 : 480;
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 44/68] [media] cx88: get rid of a warning at dprintk() macro
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (39 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 43/68] [media] cx88: reorder inline to prevent a gcc warning Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 45/68] [media] dmxdev: fix a comparition of unsigned expression warning Mauro Carvalho Chehab
                   ` (19 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/cx88/cx88-mpeg.c: In function 'cx8802_mpeg_irq':
drivers/media/pci/cx88/cx88-mpeg.c:419:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-mpeg.c: In function 'cx8802_irq':
drivers/media/pci/cx88/cx88-mpeg.c:453:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-alsa.c: In function 'snd_cx88_create':
drivers/media/pci/cx88/cx88-alsa.c:818:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-alsa.c:837:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-alsa.c: In function 'cx88_audio_initdev':
drivers/media/pci/cx88/cx88-alsa.c:912:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_mbox_func':
drivers/media/pci/cx88/cx88-blackbird.c:327:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:333:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:360:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_find_mailbox':
drivers/media/pci/cx88/cx88-blackbird.c:421:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_load_firmware':
drivers/media/pci/cx88/cx88-blackbird.c:444:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:451:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:453:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:459:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:466:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:487:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:492:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:503:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_initialize_codec':
drivers/media/pci/cx88/cx88-blackbird.c:560:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:566:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:569:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/cx88/cx88-alsa.c      | 14 +++++++++-----
 drivers/media/pci/cx88/cx88-blackbird.c |  7 ++++---
 drivers/media/pci/cx88/cx88-mpeg.c      | 14 +++++++++-----
 3 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c
index 3aa6856..d2de1a9 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -45,11 +45,15 @@
 #include "cx88.h"
 #include "cx88-reg.h"
 
-#define dprintk(level,fmt, arg...)	if (debug >= level) \
-	printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg)
-
-#define dprintk_core(level,fmt, arg...)	if (debug >= level) \
-	printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg)
+#define dprintk(level, fmt, arg...) do {				\
+	if (debug + 1 > level)						\
+		printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg);\
+} while(0)
+
+#define dprintk_core(level, fmt, arg...) do {				\
+	if (debug + 1 > level)						\
+		printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg);\
+} while(0)
 
 /****************************************************************************
 	Data type declarations - Can be moded to a header file later
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c
index 62184eb..a6ff8a6 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -53,9 +53,10 @@ static unsigned int debug;
 module_param(debug,int,0644);
 MODULE_PARM_DESC(debug,"enable debug messages [blackbird]");
 
-#define dprintk(level,fmt, arg...)	if (debug >= level) \
-	printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg)
-
+#define dprintk(level, fmt, arg...) do {				      \
+	if (debug + 1 > level)						      \
+		printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg); \
+} while(0)
 
 /* ------------------------------------------------------------------ */
 
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c
index 1b7e979..d46b008 100644
--- a/drivers/media/pci/cx88/cx88-mpeg.c
+++ b/drivers/media/pci/cx88/cx88-mpeg.c
@@ -45,11 +45,15 @@ static unsigned int debug;
 module_param(debug,int,0644);
 MODULE_PARM_DESC(debug,"enable debug messages [mpeg]");
 
-#define dprintk(level,fmt, arg...)	if (debug >= level) \
-	printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg)
-
-#define mpeg_dbg(level,fmt, arg...)	if (debug >= level) \
-	printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg)
+#define dprintk(level, fmt, arg...) do {				       \
+	if (debug + 1 > level)						       \
+		printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg); \
+} while(0)
+
+#define mpeg_dbg(level, fmt, arg...) do {				  \
+	if (debug + 1 > level)						  \
+		printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg); \
+} while(0)
 
 #if defined(CONFIG_MODULES) && defined(MODULE)
 static void request_module_async(struct work_struct *work)
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 45/68] [media] dmxdev: fix a comparition of unsigned expression warning
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (40 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 44/68] [media] cx88: get rid of a warning at dprintk() macro Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 46/68] [media] drxk: get rid of some unused vars Mauro Carvalho Chehab
                   ` (18 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-core/dmxdev.c: In function 'dvb_dmxdev_pes_filter_set':
drivers/media/dvb-core/dmxdev.c:880:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-core/dmxdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
index 889c9c1..d81dbb2 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -877,7 +877,7 @@ static int dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev,
 	dvb_dmxdev_filter_stop(dmxdevfilter);
 	dvb_dmxdev_filter_reset(dmxdevfilter);
 
-	if (params->pes_type > DMX_PES_OTHER || params->pes_type < 0)
+	if ((unsigned)params->pes_type > DMX_PES_OTHER)
 		return -EINVAL;
 
 	dmxdevfilter->type = DMXDEV_TYPE_PES;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 46/68] [media] drxk: get rid of some unused vars
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (41 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 45/68] [media] dmxdev: fix a comparition of unsigned expression warning Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 49/68] [media] ngene: better comment unused code to avoid warnings Mauro Carvalho Chehab
                   ` (17 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/dvb-frontends/drxk_hard.c:68:13: warning: 'IsA1WithPatchCode' defined but not used [-Wunused-function]
drivers/media/dvb-frontends/drxk_hard.c:73:13: warning: 'IsA1WithRomCode' defined but not used [-Wunused-function]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb-frontends/drxk_hard.c | 15 ---------------
 drivers/media/dvb-frontends/drxk_hard.h |  6 +-----
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c
index fb23496..59382fb 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -65,16 +65,6 @@ static bool IsQAM(struct drxk_state *state)
 	    state->m_OperationMode == OM_QAM_ITU_C;
 }
 
-static bool IsA1WithPatchCode(struct drxk_state *state)
-{
-	return state->m_DRXK_A1_PATCH_CODE;
-}
-
-static bool IsA1WithRomCode(struct drxk_state *state)
-{
-	return state->m_DRXK_A1_ROM_CODE;
-}
-
 #define NOA1ROM 0
 
 #define DRXDAP_FASI_SHORT_FORMAT(addr) (((addr) & 0xFC30FF80) == 0)
@@ -720,11 +710,6 @@ static int init_state(struct drxk_state *state)
 
 	state->m_bPowerDown = (ulPowerDown != 0);
 
-	state->m_DRXK_A1_PATCH_CODE = false;
-	state->m_DRXK_A1_ROM_CODE = false;
-	state->m_DRXK_A2_ROM_CODE = false;
-	state->m_DRXK_A3_ROM_CODE = false;
-	state->m_DRXK_A2_PATCH_CODE = false;
 	state->m_DRXK_A3_PATCH_CODE = false;
 
 	/* Init AGC and PGA parameters */
diff --git a/drivers/media/dvb-frontends/drxk_hard.h b/drivers/media/dvb-frontends/drxk_hard.h
index 6bb9fc4..d18a896 100644
--- a/drivers/media/dvb-frontends/drxk_hard.h
+++ b/drivers/media/dvb-frontends/drxk_hard.h
@@ -320,11 +320,7 @@ struct drxk_state {
 
 	u8               *m_microcode;
 	int               m_microcode_length;
-	bool              m_DRXK_A1_PATCH_CODE;
-	bool              m_DRXK_A1_ROM_CODE;
-	bool              m_DRXK_A2_ROM_CODE;
-	bool              m_DRXK_A3_ROM_CODE;
-	bool              m_DRXK_A2_PATCH_CODE;
+	bool		  m_DRXK_A3_ROM_CODE;
 	bool              m_DRXK_A3_PATCH_CODE;
 
 	bool              m_rfmirror;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 49/68] [media] ngene: better comment unused code to avoid warnings
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (42 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 46/68] [media] drxk: get rid of some unused vars Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 50/68] [media] saa7134,saa7164: warning: comparison of unsigned fixes Mauro Carvalho Chehab
                   ` (16 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

get rid of a few warnings about empty body:
drivers/media/pci/ngene/ngene-core.c:756:3: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
drivers/media/pci/ngene/ngene-cards.c:429:5: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
Those are due to some commented code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/ngene/ngene-cards.c | 4 +++-
 drivers/media/pci/ngene/ngene-core.c  | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c
index 96a13ed..b38bce5 100644
--- a/drivers/media/pci/ngene/ngene-cards.c
+++ b/drivers/media/pci/ngene/ngene-cards.c
@@ -425,8 +425,10 @@ static int ReadEEProm(struct i2c_adapter *adapter,
 		status = i2c_read_eeprom(adapter, 0x50, Addr, data, Length);
 		if (!status) {
 			*pLength = EETag[2];
+#if 0
 			if (Length < EETag[2])
-				; /*status=STATUS_BUFFER_OVERFLOW; */
+				status = STATUS_BUFFER_OVERFLOW;
+#endif
 		}
 	}
 	return status;
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c
index c8e0d5b..2c2df88 100644
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -752,8 +752,8 @@ void set_transfer(struct ngene_channel *chan, int state)
 		if (chan->mode & NGENE_IO_TSIN)
 			chan->pBufferExchange = tsin_exchange;
 		spin_unlock_irq(&chan->state_lock);
-	} else
-		;/* printk(KERN_INFO DEVICE_NAME ": lock=%08x\n",
+	}
+		/* else printk(KERN_INFO DEVICE_NAME ": lock=%08x\n",
 			   ngreadl(0x9310)); */
 
 	ret = ngene_command_stream_control(dev, chan->number,
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 50/68] [media] saa7134,saa7164: warning: comparison of unsigned fixes
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (43 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 49/68] [media] ngene: better comment unused code to avoid warnings Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 51/68] [media] meye: fix a warning Mauro Carvalho Chehab
                   ` (15 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/saa7134/saa7134-core.c:947:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/saa7164/saa7164-core.c:413:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/pci/saa7164/saa7164-core.c:489:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/pci/saa7134/saa7134-video.c:2514:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/saa7134/saa7134-core.c  | 3 +--
 drivers/media/pci/saa7134/saa7134-video.c | 2 +-
 drivers/media/pci/saa7164/saa7164-core.c  | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c
index f2b37e0..8976d0e 100644
--- a/drivers/media/pci/saa7134/saa7134-core.c
+++ b/drivers/media/pci/saa7134/saa7134-core.c
@@ -944,8 +944,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
 
 	/* board config */
 	dev->board = pci_id->driver_data;
-	if (card[dev->nr] >= 0 &&
-	    card[dev->nr] < saa7134_bcount)
+	if ((unsigned)card[dev->nr] < saa7134_bcount)
 		dev->board = card[dev->nr];
 	if (SAA7134_BOARD_UNKNOWN == dev->board)
 		must_configure_manually(0);
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 4a77124..3abf527 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -2511,7 +2511,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
 	/* sanitycheck insmod options */
 	if (gbuffers < 2 || gbuffers > VIDEO_MAX_FRAME)
 		gbuffers = 2;
-	if (gbufsize < 0 || gbufsize > gbufsize_max)
+	if (gbufsize > gbufsize_max)
 		gbufsize = gbufsize_max;
 	gbufsize = (gbufsize + PAGE_SIZE - 1) & PAGE_MASK;
 
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
index 2c9ad87..063047f 100644
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -410,7 +410,7 @@ static void saa7164_work_enchandler(struct work_struct *w)
 		} else
 			rp = (port->last_svc_rp + 1) % 8;
 
-		if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) {
+		if (rp > (port->hwcfg.buffercount - 1)) {
 			printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
 			break;
 		}
@@ -486,7 +486,7 @@ static void saa7164_work_vbihandler(struct work_struct *w)
 		} else
 			rp = (port->last_svc_rp + 1) % 8;
 
-		if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) {
+		if (rp > (port->hwcfg.buffercount - 1)) {
 			printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
 			break;
 		}
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 51/68] [media] meye: fix a warning
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (44 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 50/68] [media] saa7134,saa7164: warning: comparison of unsigned fixes Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 52/68] [media] m2m-deinterlace: remove unused vars Mauro Carvalho Chehab
                   ` (14 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/meye/meye.c:1948:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/meye/meye.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index e5a76da..ae7d320 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1945,7 +1945,7 @@ static struct pci_driver meye_driver = {
 static int __init meye_init(void)
 {
 	gbuffers = max(2, min((int)gbuffers, MEYE_MAX_BUFNBRS));
-	if (gbufsize < 0 || gbufsize > MEYE_MAX_BUFSIZE)
+	if (gbufsize > MEYE_MAX_BUFSIZE)
 		gbufsize = MEYE_MAX_BUFSIZE;
 	gbufsize = PAGE_ALIGN(gbufsize);
 	printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) "
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 52/68] [media] m2m-deinterlace: remove unused vars
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (45 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 51/68] [media] meye: fix a warning Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 53/68] [media] tlg2300: index is unsigned, so never below zero Mauro Carvalho Chehab
                   ` (13 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/platform/m2m-deinterlace.c:229:15: warning: variable 'd_size' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/platform/m2m-deinterlace.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
index fcdbb27..05c560f 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -218,15 +218,14 @@ static void dma_callback(void *data)
 static void deinterlace_issue_dma(struct deinterlace_ctx *ctx, int op,
 				  int do_callback)
 {
-	struct deinterlace_q_data *s_q_data, *d_q_data;
+	struct deinterlace_q_data *s_q_data;
 	struct vb2_buffer *src_buf, *dst_buf;
 	struct deinterlace_dev *pcdev = ctx->dev;
 	struct dma_chan *chan = pcdev->dma_chan;
 	struct dma_device *dmadev = chan->device;
 	struct dma_async_tx_descriptor *tx;
 	unsigned int s_width, s_height;
-	unsigned int d_width, d_height;
-	unsigned int d_size, s_size;
+	unsigned int s_size;
 	dma_addr_t p_in, p_out;
 	enum dma_ctrl_flags flags;
 
@@ -238,11 +237,6 @@ static void deinterlace_issue_dma(struct deinterlace_ctx *ctx, int op,
 	s_height = s_q_data->height;
 	s_size = s_width * s_height;
 
-	d_q_data = get_q_data(V4L2_BUF_TYPE_VIDEO_CAPTURE);
-	d_width = d_q_data->width;
-	d_height = d_q_data->height;
-	d_size = d_width * d_height;
-
 	p_in = (dma_addr_t)vb2_dma_contig_plane_dma_addr(src_buf, 0);
 	p_out = (dma_addr_t)vb2_dma_contig_plane_dma_addr(dst_buf, 0);
 	if (!p_in || !p_out) {
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 53/68] [media] tlg2300: index is unsigned, so never below zero
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (46 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 52/68] [media] m2m-deinterlace: remove unused vars Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 54/68] [media] fmdrv: better define fmdbg() macro to avoid warnings Mauro Carvalho Chehab
                   ` (12 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Huang Shijie,
	Kang Yong, Zhang Xiaobing

drivers/media/usb/tlg2300/pd-video.c:891:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/usb/tlg2300/pd-video.c:926:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Cc: Huang Shijie <shijie8@gmail.com>
Cc: Kang Yong <kangyong@telegent.com>
Cc: Zhang Xiaobing <xbzhang@telegent.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/tlg2300/pd-video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c
index 1f448ac..3082bfa 100644
--- a/drivers/media/usb/tlg2300/pd-video.c
+++ b/drivers/media/usb/tlg2300/pd-video.c
@@ -888,7 +888,7 @@ static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *in)
 {
 	struct front_face *front = fh;
 
-	if (in->index < 0 || in->index >= POSEIDON_INPUTS)
+	if (in->index >= POSEIDON_INPUTS)
 		return -EINVAL;
 	strcpy(in->name, pd_inputs[in->index].name);
 	in->type  = V4L2_INPUT_TYPE_TUNER;
@@ -923,7 +923,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int i)
 	struct poseidon *pd = front->pd;
 	s32 ret, cmd_status;
 
-	if (i < 0 || i >= POSEIDON_INPUTS)
+	if (i >= POSEIDON_INPUTS)
 		return -EINVAL;
 	ret = send_set_req(pd, SGNL_SRC_SEL,
 			pd_inputs[i].tlg_src, &cmd_status);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 54/68] [media] fmdrv: better define fmdbg() macro to avoid warnings
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (47 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 53/68] [media] tlg2300: index is unsigned, so never below zero Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 55/68] [media] v4l2-common: h_bp var is unused at v4l2_detect_gtf() Mauro Carvalho Chehab
                   ` (11 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/radio/wl128x/fmdrv_common.c:1619:47: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/radio/wl128x/fmdrv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/wl128x/fmdrv.h b/drivers/media/radio/wl128x/fmdrv.h
index d84ad9d..aac0f02 100644
--- a/drivers/media/radio/wl128x/fmdrv.h
+++ b/drivers/media/radio/wl128x/fmdrv.h
@@ -60,7 +60,7 @@
 #define fmdbg(format, ...) \
 	printk(KERN_DEBUG "fmdrv: " format, ## __VA_ARGS__)
 #else /* DEBUG */
-#define fmdbg(format, ...)
+#define fmdbg(format, ...) do {} while(0)
 #endif
 enum {
 	FM_MODE_OFF,
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 55/68] [media] v4l2-common: h_bp var is unused at v4l2_detect_gtf()
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (48 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 54/68] [media] fmdrv: better define fmdbg() macro to avoid warnings Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 56/68] [media] tua9001: fix a warning Mauro Carvalho Chehab
                   ` (10 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/v4l2-core/v4l2-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
index f995dd3..380ddd8 100644
--- a/drivers/media/v4l2-core/v4l2-common.c
+++ b/drivers/media/v4l2-core/v4l2-common.c
@@ -837,7 +837,7 @@ bool v4l2_detect_gtf(unsigned frame_height,
 		struct v4l2_dv_timings *fmt)
 {
 	int pix_clk;
-	int  v_fp, v_bp, h_fp, h_bp, hsync;
+	int  v_fp, v_bp, h_fp, hsync;
 	int frame_width, image_height, image_width;
 	bool default_gtf;
 	int h_blank;
@@ -885,7 +885,6 @@ bool v4l2_detect_gtf(unsigned frame_height,
 	hsync = hsync - hsync % GTF_CELL_GRAN;
 
 	h_fp = h_blank / 2 - hsync;
-	h_bp = h_blank / 2;
 
 	fmt->bt.polarities = polarities;
 	fmt->bt.width = image_width;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 56/68] [media] tua9001: fix a warning
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (49 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 55/68] [media] v4l2-common: h_bp var is unused at v4l2_detect_gtf() Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-11-05 21:10   ` Antti Palosaari
  2012-10-27 20:41 ` [PATCH 58/68] [media] em28xx-cards: " Mauro Carvalho Chehab
                   ` (9 subsequent siblings)
  60 siblings, 1 reply; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Antti Palosaari

drivers/media/tuners/tua9001.c:211:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/tuners/tua9001.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/tuners/tua9001.c b/drivers/media/tuners/tua9001.c
index 3896684..83a6240 100644
--- a/drivers/media/tuners/tua9001.c
+++ b/drivers/media/tuners/tua9001.c
@@ -136,7 +136,7 @@ static int tua9001_set_params(struct dvb_frontend *fe)
 {
 	struct tua9001_priv *priv = fe->tuner_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
-	int ret, i;
+	int ret = 0, i;
 	u16 val;
 	u32 frequency;
 	struct reg_val data[2];
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 58/68] [media] em28xx-cards: fix a warning
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (50 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 56/68] [media] tua9001: fix a warning Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 59/68] [media] s2255drv: index is always positive Mauro Carvalho Chehab
                   ` (8 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/em28xx/em28xx-cards.c:3309:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/em28xx/em28xx-cards.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index bcd06e5..619bffb 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3306,7 +3306,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
 
 	dev->num_alt = interface->num_altsetting;
 
-	if ((card[nr] >= 0) && (card[nr] < em28xx_bcount))
+	if ((unsigned)card[nr] < em28xx_bcount)
 		dev->model = card[nr];
 
 	/* save our data pointer in this interface device */
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 59/68] [media] s2255drv: index is always positive
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (51 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 58/68] [media] em28xx-cards: " Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 60/68] [media] usbvision-core: fix a warning Mauro Carvalho Chehab
                   ` (7 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/s2255/s2255drv.c:1654:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/s2255/s2255drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 2191f6d..8ebec0d 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1651,7 +1651,7 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv,
 	int is_ntsc = 0;
 #define NUM_FRAME_ENUMS 4
 	int frm_dec[NUM_FRAME_ENUMS] = {1, 2, 3, 5};
-	if (fe->index < 0 || fe->index >= NUM_FRAME_ENUMS)
+	if (fe->index >= NUM_FRAME_ENUMS)
 		return -EINVAL;
 	switch (fe->width) {
 	case 640:
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 60/68] [media] usbvision-core: fix a warning
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (52 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 59/68] [media] s2255drv: index is always positive Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 61/68] [media] zr364xx: urb actual_length is unsigned Mauro Carvalho Chehab
                   ` (6 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/usbvision/usbvision-core.c:1749:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/usbvision/usbvision.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/usbvision/usbvision.h b/drivers/media/usb/usbvision/usbvision.h
index 43cf61f..8a25876 100644
--- a/drivers/media/usb/usbvision/usbvision.h
+++ b/drivers/media/usb/usbvision/usbvision.h
@@ -167,7 +167,7 @@ enum {
 
 /* This macro restricts an int variable to an inclusive range */
 #define RESTRICT_TO_RANGE(v, mi, ma) \
-	{ if ((v) < (mi)) (v) = (mi); else if ((v) > (ma)) (v) = (ma); }
+	{ if (((int)v) < (mi)) (v) = (mi); else if ((v) > (ma)) (v) = (ma); }
 
 /*
  * We use macros to do YUV -> RGB conversion because this is
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 61/68] [media] zr364xx: urb actual_length is unsigned
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (53 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 60/68] [media] usbvision-core: fix a warning Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 62/68] [media] bttv-driver: fix two warnings Mauro Carvalho Chehab
                   ` (5 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Antoine Jacquet

drivers/media/usb/zr364xx/zr364xx.c:1010:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Cc: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/zr364xx/zr364xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c
index 9afab35..39edd44 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -1007,8 +1007,7 @@ static void read_pipe_completion(struct urb *purb)
 		return;
 	}
 
-	if (purb->actual_length < 0 ||
-	    purb->actual_length > pipe_info->transfer_size) {
+	if (purb->actual_length > pipe_info->transfer_size) {
 		dev_err(&cam->udev->dev, "wrong number of bytes\n");
 		return;
 	}
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 62/68] [media] bttv-driver: fix two warnings
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (54 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 61/68] [media] zr364xx: urb actual_length is unsigned Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 64/68] [media] au0828-dvb: ret is never tested. Get rid of it Mauro Carvalho Chehab
                   ` (4 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: initialized field overwritten [-Woverride-init]
drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: (near initialization for 'bttv_tvnorms[0].cropcap.bounds.height') [-Woverride-init]
drivers/media/pci/bt8xx/bttv-driver.c: In function 'bttv_remove':
drivers/media/pci/bt8xx/bttv-driver.c:4467:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/bt8xx/bttv-driver.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 56c6c77..de6f41f 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -200,7 +200,7 @@ static void flush_request_modules(struct bttv *dev)
 }
 #else
 #define request_modules(dev)
-#define flush_request_modules(dev)
+#define flush_request_modules(dev) do {} while(0)
 #endif /* CONFIG_MODULES */
 
 
@@ -301,11 +301,10 @@ const struct bttv_tvnorm bttv_tvnorms[] = {
 			/* totalwidth */ 1135,
 			/* sqwidth */ 944,
 			/* vdelay */ 0x20,
-			/* sheight */ 576,
-			/* videostart0 */ 23)
 		/* bt878 (and bt848?) can capture another
 		   line below active video. */
-		.cropcap.bounds.height = (576 + 2) + 0x20 - 2,
+			/* sheight */ (576 + 2) + 0x20 - 2,
+			/* videostart0 */ 23)
 	},{
 		.v4l2_id        = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR,
 		.name           = "NTSC",
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 64/68] [media] au0828-dvb: ret is never tested. Get rid of it
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (55 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 62/68] [media] bttv-driver: fix two warnings Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 65/68] [media] soc_camera: ret is never used. get " Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/usb/au0828/au0828-dvb.c:275:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/usb/au0828/au0828-dvb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-dvb.c b/drivers/media/usb/au0828/au0828-dvb.c
index b328f65..9a6f156 100644
--- a/drivers/media/usb/au0828/au0828-dvb.c
+++ b/drivers/media/usb/au0828/au0828-dvb.c
@@ -272,7 +272,6 @@ static void au0828_restart_dvb_streaming(struct work_struct *work)
 	struct au0828_dev *dev = container_of(work, struct au0828_dev,
 					      restart_streaming);
 	struct au0828_dvb *dvb = &dev->dvb;
-	int ret;
 
 	if (dev->urb_streaming == 0)
 		return;
@@ -282,7 +281,7 @@ static void au0828_restart_dvb_streaming(struct work_struct *work)
 	mutex_lock(&dvb->lock);
 
 	/* Stop transport */
-	ret = stop_urb_transfer(dev);
+	stop_urb_transfer(dev);
 	au0828_write(dev, 0x608, 0x00);
 	au0828_write(dev, 0x609, 0x00);
 	au0828_write(dev, 0x60a, 0x00);
@@ -293,7 +292,7 @@ static void au0828_restart_dvb_streaming(struct work_struct *work)
 	au0828_write(dev, 0x609, 0x72);
 	au0828_write(dev, 0x60a, 0x71);
 	au0828_write(dev, 0x60b, 0x01);
-	ret = start_urb_transfer(dev);
+	start_urb_transfer(dev);
 
 	mutex_unlock(&dvb->lock);
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 65/68] [media] soc_camera: ret is never used. get rid of it
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (56 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 64/68] [media] au0828-dvb: ret is never tested. Get rid of it Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 66/68] [media] fmdrv: Don't check if unsigned are below zero Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Guennadi Liakhovetski

drivers/media/platform/soc_camera/soc_camera.c:1051:8: warning: variable 'ret' set but not used [-Wunused-but-set-variable]

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/platform/soc_camera/soc_camera.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index d3f0b84..6f76ada 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1048,10 +1048,8 @@ static void scan_add_host(struct soc_camera_host *ici)
 
 	list_for_each_entry(icd, &devices, list) {
 		if (icd->iface == ici->nr) {
-			int ret;
-
 			icd->parent = ici->v4l2_dev.dev;
-			ret = soc_camera_probe(icd);
+			soc_camera_probe(icd);
 		}
 	}
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 66/68] [media] fmdrv: Don't check if unsigned are below zero
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (57 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 65/68] [media] soc_camera: ret is never used. get " Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
  2012-10-27 20:41 ` [PATCH 67/68] fintek-cir: get rid of warning: no previous prototype Cc: Linux Media Mailing List <linux-media@vger.kernel.org> Mauro Carvalho Chehab
       [not found] ` <1351370486-29040-58-git-send-email-mchehab@redhat.com>
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/radio/wl128x/fmdrv_common.c:745:3: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/media/radio/wl128x/fmdrv_rx.c:308:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/radio/wl128x/fmdrv_common.c | 2 +-
 drivers/media/radio/wl128x/fmdrv_rx.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index bf867a6..602ef7a 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -742,7 +742,7 @@ static void fm_irq_handle_rdsdata_getcmd_resp(struct fmdev *fmdev)
 		if ((meta_data & FM_RDS_STATUS_ERR_MASK) != 0)
 			break;
 
-		if (blk_idx < FM_RDS_BLK_IDX_A || blk_idx > FM_RDS_BLK_IDX_D) {
+		if (blk_idx > FM_RDS_BLK_IDX_D) {
 			fmdbg("Block sequence mismatch\n");
 			rds->last_blk_idx = -1;
 			break;
diff --git a/drivers/media/radio/wl128x/fmdrv_rx.c b/drivers/media/radio/wl128x/fmdrv_rx.c
index 3dd9fc0..ebf09a3 100644
--- a/drivers/media/radio/wl128x/fmdrv_rx.c
+++ b/drivers/media/radio/wl128x/fmdrv_rx.c
@@ -305,7 +305,7 @@ int fm_rx_set_volume(struct fmdev *fmdev, u16 vol_to_set)
 	if (fmdev->curr_fmmode != FM_MODE_RX)
 		return -EPERM;
 
-	if (vol_to_set < FM_RX_VOLUME_MIN || vol_to_set > FM_RX_VOLUME_MAX) {
+	if (vol_to_set > FM_RX_VOLUME_MAX) {
 		fmerr("Volume is not within(%d-%d) range\n",
 			   FM_RX_VOLUME_MIN, FM_RX_VOLUME_MAX);
 		return -EINVAL;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 67/68] fintek-cir: get rid of warning: no previous prototype Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
  2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
                   ` (58 preceding siblings ...)
  2012-10-27 20:41 ` [PATCH 66/68] [media] fmdrv: Don't check if unsigned are below zero Mauro Carvalho Chehab
@ 2012-10-27 20:41 ` Mauro Carvalho Chehab
       [not found] ` <1351370486-29040-58-git-send-email-mchehab@redhat.com>
  60 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-27 20:41 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

drivers/media/rc/fintek-cir.c:687:5: warning: no previous prototype for 'fintek_init' [-Wmissing-prototypes]
drivers/media/rc/fintek-cir.c:692:6: warning: no previous prototype for 'fintek_exit' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/rc/fintek-cir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index d2d93cb..936c3f7 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -684,12 +684,12 @@ static struct pnp_driver fintek_driver = {
 	.shutdown	= fintek_shutdown,
 };
 
-int fintek_init(void)
+static int fintek_init(void)
 {
 	return pnp_register_driver(&fintek_driver);
 }
 
-void fintek_exit(void)
+static void fintek_exit(void)
 {
 	pnp_unregister_driver(&fintek_driver);
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* Re: [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success
  2012-10-27 20:40 ` [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success Mauro Carvalho Chehab
@ 2012-10-29 11:37   ` Ezequiel Garcia
  2012-10-29 11:41     ` Mauro Carvalho Chehab
  2012-10-29 11:44     ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 68+ messages in thread
From: Ezequiel Garcia @ 2012-10-29 11:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Sat, Oct 27, 2012 at 5:40 PM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
> drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe':
> drivers/media/usb/pwc/pwc-if.c:1003:16: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]
> In the past, it used to have a logic there at queue init that would
> BUG() on errors. This logic got removed. Drivers are now required
> to explicitly handle the queue initialization errors, or very bad
> things may happen.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> ---
>  drivers/media/usb/pwc/pwc-if.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
> index e191572..5210239 100644
> --- a/drivers/media/usb/pwc/pwc-if.c
> +++ b/drivers/media/usb/pwc/pwc-if.c
> @@ -1000,7 +1000,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
>         pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
>         pdev->vb_queue.ops = &pwc_vb_queue_ops;
>         pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
> -       vb2_queue_init(&pdev->vb_queue);
> +       rc = vb2_queue_init(&pdev->vb_queue);
> +       if (rc < 0) {
> +               PWC_ERROR("Oops, could not initialize vb2 queue.\n");
> +               goto err_free_mem;
> +       }
>
>         /* Init video_device structure */
>         memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
> --
> 1.7.11.7
>

Weird, I thought this was already fixed...

https://patchwork.kernel.org/patch/1467211/

And even weirder...
now all my patches are marked as 'New' by patchwork...

https://patchwork.kernel.org/project/linux-media/list/?submitter=37031&state=*

(this must be the last name mess I did...)

    Ezequiel

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success
  2012-10-29 11:37   ` Ezequiel Garcia
@ 2012-10-29 11:41     ` Mauro Carvalho Chehab
  2012-10-29 11:44     ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-29 11:41 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: Linux Media Mailing List

Em Mon, 29 Oct 2012 08:37:31 -0300
Ezequiel Garcia <elezegarcia@gmail.com> escreveu:

> On Sat, Oct 27, 2012 at 5:40 PM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
> > drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe':
> > drivers/media/usb/pwc/pwc-if.c:1003:16: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]
> > In the past, it used to have a logic there at queue init that would
> > BUG() on errors. This logic got removed. Drivers are now required
> > to explicitly handle the queue initialization errors, or very bad
> > things may happen.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> > ---
> >  drivers/media/usb/pwc/pwc-if.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
> > index e191572..5210239 100644
> > --- a/drivers/media/usb/pwc/pwc-if.c
> > +++ b/drivers/media/usb/pwc/pwc-if.c
> > @@ -1000,7 +1000,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
> >         pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
> >         pdev->vb_queue.ops = &pwc_vb_queue_ops;
> >         pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
> > -       vb2_queue_init(&pdev->vb_queue);
> > +       rc = vb2_queue_init(&pdev->vb_queue);
> > +       if (rc < 0) {
> > +               PWC_ERROR("Oops, could not initialize vb2 queue.\n");
> > +               goto err_free_mem;
> > +       }
> >
> >         /* Init video_device structure */
> >         memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
> > --
> > 1.7.11.7
> >
> 
> Weird, I thought this was already fixed...
> 
> https://patchwork.kernel.org/patch/1467211/
> 
> And even weirder...
> now all my patches are marked as 'New' by patchwork...
> 
> https://patchwork.kernel.org/project/linux-media/list/?submitter=37031&state=*
> 
> (this must be the last name mess I did...)

That's really weird. Did you receive the patchwork state notification email 
for any of those patches?
> 
>     Ezequiel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Regards,
Mauro

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success
  2012-10-29 11:37   ` Ezequiel Garcia
  2012-10-29 11:41     ` Mauro Carvalho Chehab
@ 2012-10-29 11:44     ` Mauro Carvalho Chehab
  2012-10-29 13:07       ` Ezequiel Garcia
  1 sibling, 1 reply; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-29 11:44 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: Linux Media Mailing List

Em Mon, 29 Oct 2012 08:37:31 -0300
Ezequiel Garcia <elezegarcia@gmail.com> escreveu:

> On Sat, Oct 27, 2012 at 5:40 PM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
> > drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe':
> > drivers/media/usb/pwc/pwc-if.c:1003:16: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]
> > In the past, it used to have a logic there at queue init that would
> > BUG() on errors. This logic got removed. Drivers are now required
> > to explicitly handle the queue initialization errors, or very bad
> > things may happen.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> > ---
> >  drivers/media/usb/pwc/pwc-if.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
> > index e191572..5210239 100644
> > --- a/drivers/media/usb/pwc/pwc-if.c
> > +++ b/drivers/media/usb/pwc/pwc-if.c
> > @@ -1000,7 +1000,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
> >         pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
> >         pdev->vb_queue.ops = &pwc_vb_queue_ops;
> >         pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
> > -       vb2_queue_init(&pdev->vb_queue);
> > +       rc = vb2_queue_init(&pdev->vb_queue);
> > +       if (rc < 0) {
> > +               PWC_ERROR("Oops, could not initialize vb2 queue.\n");
> > +               goto err_free_mem;
> > +       }
> >
> >         /* Init video_device structure */
> >         memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
> > --
> > 1.7.11.7
> >
> 
> Weird, I thought this was already fixed...
> 
> https://patchwork.kernel.org/patch/1467211/
> 
> And even weirder...
> now all my patches are marked as 'New' by patchwork...
> 
> https://patchwork.kernel.org/project/linux-media/list/?submitter=37031&state=*
> 
> (this must be the last name mess I did...)

Nah, you're looking at the wrong place. you should be looking at patchwork.linuxtv.org.

The ones I have with your name on it are those:

patches/lmml_15142_01_23_uvc_replace_memcpy_with_struct_assignment.patch
patches/lmml_15143_22_23_radio_wl1273_replace_memcpy_with_struct_assignment.patch
patches/lmml_15144_23_23_wl128x_replace_memcpy_with_struct_assignment.patch
patches/lmml_15145_21_23_dvb_frontends_replace_memcpy_with_struct_assignment.patch
patches/lmml_15146_20_23_dvb_core_replace_memcpy_with_struct_assignment.patch
patches/lmml_15147_18_23_cx18_replace_memcpy_with_struct_assignment.patch
patches/lmml_15148_19_23_bttv_replace_memcpy_with_struct_assignment.patch
patches/lmml_15149_17_23_cx23885_replace_memcpy_with_struct_assignment.patch
patches/lmml_15150_16_23_cx88_replace_memcpy_with_struct_assignment.patch
patches/lmml_15151_14_23_tuners_tda18271_replace_memcpy_with_struct_assignment.patch
patches/lmml_15152_15_23_ivtv_replace_memcpy_with_struct_assignment.patch
patches/lmml_15153_12_23_tuners_xc4000_replace_memcpy_with_struct_assignment.patch
patches/lmml_15154_13_23_tuners_xc2028_replace_memcpy_with_struct_assignment.patch
patches/lmml_15155_11_23_au0828_replace_memcpy_with_struct_assignment.patch
patches/lmml_15156_10_23_dvb_usb_friio_fe_replace_memcpy_with_struct_assignment.patch
patches/lmml_15157_08_23_cx25840_replace_memcpy_with_struct_assignment.patch
patches/lmml_15158_09_23_zr36067_replace_memcpy_with_struct_assignment.patch
patches/lmml_15159_06_23_pvrusb2_replace_memcpy_with_struct_assignment.patch
patches/lmml_15160_07_23_hdpvr_replace_memcpy_with_struct_assignment.patch
patches/lmml_15161_05_23_pwc_replace_memcpy_with_struct_assignment.patch
patches/lmml_15162_04_23_sn9c102_replace_memcpy_with_struct_assignment.patch
patches/lmml_15163_03_23_usbvision_replace_memcpy_with_struct_assignment.patch
patches/lmml_15164_02_23_cx231xx_replace_memcpy_with_struct_assignment.patch
patches/lmml_15165_stk1160_try_to_continue_with_fewer_transfer_buffers.patch
patches/lmml_14192_11_14_drivers_media_usb_stk1160_stk1160_i2c_c_fix_error_return_code.patch
patches/lmml_15197_maintainers_update_email_and_git_tree.patch


> 
>     Ezequiel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Regards,
Mauro

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success
  2012-10-29 11:44     ` Mauro Carvalho Chehab
@ 2012-10-29 13:07       ` Ezequiel Garcia
  0 siblings, 0 replies; 68+ messages in thread
From: Ezequiel Garcia @ 2012-10-29 13:07 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Mon, Oct 29, 2012 at 8:44 AM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
> Em Mon, 29 Oct 2012 08:37:31 -0300
> Ezequiel Garcia <elezegarcia@gmail.com> escreveu:
>
>> On Sat, Oct 27, 2012 at 5:40 PM, Mauro Carvalho Chehab
>> <mchehab@redhat.com> wrote:
>> > drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe':
>> > drivers/media/usb/pwc/pwc-if.c:1003:16: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]
>> > In the past, it used to have a logic there at queue init that would
>> > BUG() on errors. This logic got removed. Drivers are now required
>> > to explicitly handle the queue initialization errors, or very bad
>> > things may happen.
>> >
>> > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>> > ---
>> >  drivers/media/usb/pwc/pwc-if.c | 6 +++++-
>> >  1 file changed, 5 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
>> > index e191572..5210239 100644
>> > --- a/drivers/media/usb/pwc/pwc-if.c
>> > +++ b/drivers/media/usb/pwc/pwc-if.c
>> > @@ -1000,7 +1000,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
>> >         pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
>> >         pdev->vb_queue.ops = &pwc_vb_queue_ops;
>> >         pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
>> > -       vb2_queue_init(&pdev->vb_queue);
>> > +       rc = vb2_queue_init(&pdev->vb_queue);
>> > +       if (rc < 0) {
>> > +               PWC_ERROR("Oops, could not initialize vb2 queue.\n");
>> > +               goto err_free_mem;
>> > +       }
>> >
>> >         /* Init video_device structure */
>> >         memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
>> > --
>> > 1.7.11.7
>> >
>>
>> Weird, I thought this was already fixed...
>>
>> https://patchwork.kernel.org/patch/1467211/
>>
>> And even weirder...
>> now all my patches are marked as 'New' by patchwork...
>>
>> https://patchwork.kernel.org/project/linux-media/list/?submitter=37031&state=*
>>
>> (this must be the last name mess I did...)
>
> Nah, you're looking at the wrong place. you should be looking at patchwork.linuxtv.org.

Yeah... I don't know why da heck I was looking there!

Sorry for the noise ;-)

    Ezequiel

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 56/68] [media] tua9001: fix a warning
  2012-10-27 20:41 ` [PATCH 56/68] [media] tua9001: fix a warning Mauro Carvalho Chehab
@ 2012-11-05 21:10   ` Antti Palosaari
  0 siblings, 0 replies; 68+ messages in thread
From: Antti Palosaari @ 2012-11-05 21:10 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On 10/27/2012 11:41 PM, Mauro Carvalho Chehab wrote:
> drivers/media/tuners/tua9001.c:211:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Cc: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> ---
>   drivers/media/tuners/tua9001.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/tuners/tua9001.c b/drivers/media/tuners/tua9001.c
> index 3896684..83a6240 100644
> --- a/drivers/media/tuners/tua9001.c
> +++ b/drivers/media/tuners/tua9001.c
> @@ -136,7 +136,7 @@ static int tua9001_set_params(struct dvb_frontend *fe)
>   {
>   	struct tua9001_priv *priv = fe->tuner_priv;
>   	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> -	int ret, i;
> +	int ret = 0, i;
>   	u16 val;
>   	u32 frequency;
>   	struct reg_val data[2];
>

I cannot see any condition ret could be used as uninitialized. I looked 
myself that warning earlier too.

Anyway, I am fine with it.

Acked-by: Antti Palosaari <crope@iki.fi>

Antti
-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 57/68] [media] anysee: fix a warning
       [not found] ` <1351370486-29040-58-git-send-email-mchehab@redhat.com>
@ 2012-11-05 22:30   ` Antti Palosaari
  2012-11-05 22:55     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 68+ messages in thread
From: Antti Palosaari @ 2012-11-05 22:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On 10/27/2012 11:41 PM, Mauro Carvalho Chehab wrote:
> drivers/media/usb/dvb-usb-v2/anysee.c:1179:5: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Cc: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> ---
>   drivers/media/usb/dvb-usb-v2/anysee.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c
> index e78ca8f..d05c5b5 100644
> --- a/drivers/media/usb/dvb-usb-v2/anysee.c
> +++ b/drivers/media/usb/dvb-usb-v2/anysee.c
> @@ -1170,7 +1170,7 @@ static int anysee_ci_poll_slot_status(struct dvb_ca_en50221 *ci, int slot,
>   	struct dvb_usb_device *d = ci->data;
>   	struct anysee_state *state = d_to_priv(d);
>   	int ret;
> -	u8 tmp;
> +	u8 tmp = 0;
>
>   	ret = anysee_rd_reg_mask(d, REG_IOC, &tmp, 0x40);
>   	if (ret)
>

That is another one I have looked multiple times - you are even asked to 
look once few months back. I don't see how it could take that branch. 
Maybe uninitialized_var() is a little bit cheaper?

Anyway, I am OK with that too.

regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 57/68] [media] anysee: fix a warning
  2012-11-05 22:30   ` [PATCH 57/68] [media] anysee: fix a warning Antti Palosaari
@ 2012-11-05 22:55     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 68+ messages in thread
From: Mauro Carvalho Chehab @ 2012-11-05 22:55 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List

Em Tue, 06 Nov 2012 00:30:27 +0200
Antti Palosaari <crope@iki.fi> escreveu:

> On 10/27/2012 11:41 PM, Mauro Carvalho Chehab wrote:
> > drivers/media/usb/dvb-usb-v2/anysee.c:1179:5: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >
> > Cc: Antti Palosaari <crope@iki.fi>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> > ---
> >   drivers/media/usb/dvb-usb-v2/anysee.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c
> > index e78ca8f..d05c5b5 100644
> > --- a/drivers/media/usb/dvb-usb-v2/anysee.c
> > +++ b/drivers/media/usb/dvb-usb-v2/anysee.c
> > @@ -1170,7 +1170,7 @@ static int anysee_ci_poll_slot_status(struct dvb_ca_en50221 *ci, int slot,
> >   	struct dvb_usb_device *d = ci->data;
> >   	struct anysee_state *state = d_to_priv(d);
> >   	int ret;
> > -	u8 tmp;
> > +	u8 tmp = 0;
> >
> >   	ret = anysee_rd_reg_mask(d, REG_IOC, &tmp, 0x40);
> >   	if (ret)
> >
> 
> That is another one I have looked multiple times - you are even asked to 
> look once few months back. I don't see how it could take that branch. 
> Maybe uninitialized_var() is a little bit cheaper?

It is a little cheaper, but I don't like uninitialized_var(), as it can hide
real problems. So, except when performance is really important, I tend
to not use it.

> 
> Anyway, I am OK with that too.
> 
> regards
> Antti
> 




Cheers,
Mauro

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2012-11-05 22:55 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-27 20:40 [PATCH 00/68] Get rid of all warnings Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 01/68] [media] siano: get rid of warning: no previous prototype Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 02/68] [media] drxd_hard: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 04/68] [media] rtl2832: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 05/68] [media] stb0899_drv: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 06/68] [media] stv0367: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 07/68] [media] tda10071: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 08/68] [media] tda18271c2dd.c: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 09/68] [media] cx18: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 10/68] [media] cx23885: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 11/68] [media] cx23885-alsa: fix a false gcc warning at dprintk() Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 12/68] [media] cx25821: get rid of warning: no previous prototype Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 13/68] [media] dm1105: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 14/68] [media] ivtv: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 15/68] [media] ivtv-ioctl.c: remove an useless check Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 16/68] [media] mantis: get rid of warning: no previous prototype Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 17/68] [media] saa7164: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 18/68] [media] radio-aimslab.c: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 19/68] [media] radio-isa: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 20/68] [media] radio-sf16fmi: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 22/68] [media] ite-cir.c: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 23/68] [media] nuvoton-cir: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 24/68] [media] nuvoton-cir: carrier detect support is broken - remove it Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 25/68] [media] max2165: get rid of warning: no previous prototype Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 26/68] [media] au0828: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 27/68] [media] cx231xx: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 28/68] [media] cx231xx-avcore: get rid of a sophisticated do-nothing code Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 29/68] [media] az6027: get rid of warning: no previous prototype Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 31/68] [media] lmedm04: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 32/68] [media] vp702x: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 33/68] [media] pvrusb2: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 34/68] [media] pwc-if: " Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 35/68] [media] pwc-if: must check vb2_queue_init() success Mauro Carvalho Chehab
2012-10-29 11:37   ` Ezequiel Garcia
2012-10-29 11:41     ` Mauro Carvalho Chehab
2012-10-29 11:44     ` Mauro Carvalho Chehab
2012-10-29 13:07       ` Ezequiel Garcia
2012-10-27 20:40 ` [PATCH 36/68] [media] dib9000: get rid of warning: no previous prototype Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 37/68] [media] gscpa: get rid of warning: suggest braces around empty body Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 38/68] [media] jeilinj: fix return of the response code Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 39/68] [media] gspca: warning fix: index is unsigned, so it will never be below 0 Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 40/68] [media] dt3155v4l: vb2_queue_init() can now fail. Check is required Mauro Carvalho Chehab
2012-10-27 20:40 ` [PATCH 41/68] [media] go7007-v4l2: warning fix: index is unsigned, so it will never be below 0 Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 42/68] [media] dvb_frontend: Don't declare values twice at a table Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 43/68] [media] cx88: reorder inline to prevent a gcc warning Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 44/68] [media] cx88: get rid of a warning at dprintk() macro Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 45/68] [media] dmxdev: fix a comparition of unsigned expression warning Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 46/68] [media] drxk: get rid of some unused vars Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 49/68] [media] ngene: better comment unused code to avoid warnings Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 50/68] [media] saa7134,saa7164: warning: comparison of unsigned fixes Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 51/68] [media] meye: fix a warning Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 52/68] [media] m2m-deinterlace: remove unused vars Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 53/68] [media] tlg2300: index is unsigned, so never below zero Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 54/68] [media] fmdrv: better define fmdbg() macro to avoid warnings Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 55/68] [media] v4l2-common: h_bp var is unused at v4l2_detect_gtf() Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 56/68] [media] tua9001: fix a warning Mauro Carvalho Chehab
2012-11-05 21:10   ` Antti Palosaari
2012-10-27 20:41 ` [PATCH 58/68] [media] em28xx-cards: " Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 59/68] [media] s2255drv: index is always positive Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 60/68] [media] usbvision-core: fix a warning Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 61/68] [media] zr364xx: urb actual_length is unsigned Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 62/68] [media] bttv-driver: fix two warnings Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 64/68] [media] au0828-dvb: ret is never tested. Get rid of it Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 65/68] [media] soc_camera: ret is never used. get " Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 66/68] [media] fmdrv: Don't check if unsigned are below zero Mauro Carvalho Chehab
2012-10-27 20:41 ` [PATCH 67/68] fintek-cir: get rid of warning: no previous prototype Cc: Linux Media Mailing List <linux-media@vger.kernel.org> Mauro Carvalho Chehab
     [not found] ` <1351370486-29040-58-git-send-email-mchehab@redhat.com>
2012-11-05 22:30   ` [PATCH 57/68] [media] anysee: fix a warning Antti Palosaari
2012-11-05 22:55     ` Mauro Carvalho Chehab

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).