diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-04-20 06:30:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 13:49:38 -0400 |
commit | 8173090acb33500496b69ca20c7f33c3bf665958 (patch) | |
tree | 95bf2ba1c7e85fff36dcaeec6ca02e4ecae669c9 | |
parent | e92ba2830b62ba6315d48083bb7f02d3148d77db (diff) |
[media] v4l: fix compiler warnings
media_build/v4l/adv7343.c: In function 'adv7343_setstd':
media_build/v4l/adv7343.c:133:6: warning: variable 'output_idx' set but not used [-Wunused-but-set-variable]
media_build/v4l/tvp5150.c: In function 'tvp5150_mbus_fmt':
media_build/v4l/tvp5150.c:833:14: warning: variable 'std' set but not used [-Wunused-but-set-variable]
media_build/v4l/tvp7002.c: In function 'tvp7002_query_dv_preset':
media_build/v4l/tvp7002.c:673:18: warning: variable 'device' set but not used [-Wunused-but-set-variable]
media_build/v4l/c-qcam.c: In function 'qc_capture':
media_build/v4l/c-qcam.c:381:33: warning: variable 'bitsperxfer' set but not used [-Wunused-but-set-variable]
media_build/v4l/pms.c: In function 'pms_s_std':
media_build/v4l/pms.c:738:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/pms.c: In function 'init_mediavision':
media_build/v4l/pms.c:959:6: warning: variable 'id' set but not used [-Wunused-but-set-variable]
media_build/v4l/cx25821-alsa.c: In function 'cx25821_irq':
media_build/v4l/cx25821-alsa.c:294:6: warning: variable 'audint_count' set but not used [-Wunused-but-set-variable]
media_build/v4l/zr364xx.c: In function 'zr364xx_fillbuff':
media_build/v4l/zr364xx.c:510:25: warning: variable 'frm' set but not used [-Wunused-but-set-variable]
media_build/v4l/s2255drv.c: In function 's2255_fillbuff':
media_build/v4l/s2255drv.c:637:23: warning: variable 'frm' set but not used [-Wunused-but-set-variable]
media_build/v4l/s2255drv.c: In function 'vidioc_s_fmt_vid_cap':
media_build/v4l/s2255drv.c:990:6: warning: variable 'norm' set but not used [-Wunused-but-set-variable]
media_build/v4l/tm6000-stds.c: In function 'tm6000_set_audio_std':
media_build/v4l/tm6000-stds.c:341:10: warning: variable 'nicam_flag' set but not used [-Wunused-but-set-variable]
media_build/v4l/tm6000-video.c: In function 'get_next_buf':
media_build/v4l/tm6000-video.c:172:8: warning: variable 'outp' set but not used [-Wunused-but-set-variable]
media_build/v4l/tm6000-video.c: In function 'copy_streams':
media_build/v4l/tm6000-video.c:214:36: warning: variable 'c' set but not used [-Wunused-but-set-variable]
media_build/v4l/tm6000-input.c: In function 'tm6000_ir_urb_received':
media_build/v4l/tm6000-input.c:171:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
media_build/v4l/usbvision-core.c: In function 'usbvision_decompress':
media_build/v4l/usbvision-core.c:604:23: warning: variable 'max_pos' set but not used [-Wunused-but-set-variable]
media_build/v4l/usbvision-core.c: In function 'usbvision_parse_compress':
media_build/v4l/usbvision-core.c:705:39: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
media_build/v4l/usbvision-core.c:705:22: warning: variable 'bytes_per_pixel' set but not used [-Wunused-but-set-variable]
media_build/v4l/zoran_device.c: In function 'write_overlay_mask':
media_build/v4l/zoran_device.c:545:6: warning: variable 'reg' set but not used [-Wunused-but-set-variable]
media_build/v4l/go7007-v4l2.c: In function 'go7007_streamoff':
media_build/v4l/go7007-v4l2.c:79:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/adv7343.c | 4 | ||||
-rw-r--r-- | drivers/media/video/c-qcam.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx25821/cx25821-alsa.c | 2 | ||||
-rw-r--r-- | drivers/media/video/pms.c | 2 | ||||
-rw-r--r-- | drivers/media/video/s2255drv.c | 4 | ||||
-rw-r--r-- | drivers/media/video/tm6000/tm6000-input.c | 3 | ||||
-rw-r--r-- | drivers/media/video/tm6000/tm6000-stds.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tm6000/tm6000-video.c | 9 | ||||
-rw-r--r-- | drivers/media/video/tvp5150.c | 7 | ||||
-rw-r--r-- | drivers/media/video/tvp7002.c | 3 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-core.c | 12 | ||||
-rw-r--r-- | drivers/media/video/zoran/zoran_device.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zr364xx.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/go7007/go7007-v4l2.c | 2 |
14 files changed, 9 insertions, 48 deletions
diff --git a/drivers/media/video/adv7343.c b/drivers/media/video/adv7343.c index 119b60401bf3..2b5aa676a84e 100644 --- a/drivers/media/video/adv7343.c +++ b/drivers/media/video/adv7343.c | |||
@@ -130,14 +130,12 @@ static int adv7343_setstd(struct v4l2_subdev *sd, v4l2_std_id std) | |||
130 | { | 130 | { |
131 | struct adv7343_state *state = to_state(sd); | 131 | struct adv7343_state *state = to_state(sd); |
132 | struct adv7343_std_info *std_info; | 132 | struct adv7343_std_info *std_info; |
133 | int output_idx, num_std; | 133 | int num_std; |
134 | char *fsc_ptr; | 134 | char *fsc_ptr; |
135 | u8 reg, val; | 135 | u8 reg, val; |
136 | int err = 0; | 136 | int err = 0; |
137 | int i = 0; | 137 | int i = 0; |
138 | 138 | ||
139 | output_idx = state->output; | ||
140 | |||
141 | std_info = (struct adv7343_std_info *)stdinfo; | 139 | std_info = (struct adv7343_std_info *)stdinfo; |
142 | num_std = ARRAY_SIZE(stdinfo); | 140 | num_std = ARRAY_SIZE(stdinfo); |
143 | 141 | ||
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index fda32f52554a..73c65c2bf178 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c | |||
@@ -378,7 +378,7 @@ get_fragment: | |||
378 | static long qc_capture(struct qcam *qcam, char __user *buf, unsigned long len) | 378 | static long qc_capture(struct qcam *qcam, char __user *buf, unsigned long len) |
379 | { | 379 | { |
380 | struct v4l2_device *v4l2_dev = &qcam->v4l2_dev; | 380 | struct v4l2_device *v4l2_dev = &qcam->v4l2_dev; |
381 | unsigned lines, pixelsperline, bitsperxfer; | 381 | unsigned lines, pixelsperline; |
382 | unsigned int is_bi_dir = qcam->bidirectional; | 382 | unsigned int is_bi_dir = qcam->bidirectional; |
383 | size_t wantlen, outptr = 0; | 383 | size_t wantlen, outptr = 0; |
384 | char tmpbuf[BUFSZ]; | 384 | char tmpbuf[BUFSZ]; |
@@ -404,7 +404,6 @@ static long qc_capture(struct qcam *qcam, char __user *buf, unsigned long len) | |||
404 | 404 | ||
405 | lines = qcam->height; | 405 | lines = qcam->height; |
406 | pixelsperline = qcam->width; | 406 | pixelsperline = qcam->width; |
407 | bitsperxfer = (is_bi_dir) ? 24 : 8; | ||
408 | 407 | ||
409 | if (is_bi_dir) { | 408 | if (is_bi_dir) { |
410 | /* Turn the port around */ | 409 | /* Turn the port around */ |
diff --git a/drivers/media/video/cx25821/cx25821-alsa.c b/drivers/media/video/cx25821/cx25821-alsa.c index 03cfac476b03..1858a45dd081 100644 --- a/drivers/media/video/cx25821/cx25821-alsa.c +++ b/drivers/media/video/cx25821/cx25821-alsa.c | |||
@@ -290,11 +290,9 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id) | |||
290 | u32 status, pci_status; | 290 | u32 status, pci_status; |
291 | u32 audint_status, audint_mask; | 291 | u32 audint_status, audint_mask; |
292 | int loop, handled = 0; | 292 | int loop, handled = 0; |
293 | int audint_count = 0; | ||
294 | 293 | ||
295 | audint_status = cx_read(AUD_A_INT_STAT); | 294 | audint_status = cx_read(AUD_A_INT_STAT); |
296 | audint_mask = cx_read(AUD_A_INT_MSK); | 295 | audint_mask = cx_read(AUD_A_INT_MSK); |
297 | audint_count = cx_read(AUD_A_GPCNT); | ||
298 | status = cx_read(PCI_INT_STAT); | 296 | status = cx_read(PCI_INT_STAT); |
299 | 297 | ||
300 | for (loop = 0; loop < 1; loop++) { | 298 | for (loop = 0; loop < 1; loop++) { |
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 8b80f9808911..af2d9086d7e8 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c | |||
@@ -916,7 +916,6 @@ static const struct v4l2_ioctl_ops pms_ioctl_ops = { | |||
916 | 916 | ||
917 | static int init_mediavision(struct pms *dev) | 917 | static int init_mediavision(struct pms *dev) |
918 | { | 918 | { |
919 | int id; | ||
920 | int idec, decst; | 919 | int idec, decst; |
921 | int i; | 920 | int i; |
922 | static const unsigned char i2c_defs[] = { | 921 | static const unsigned char i2c_defs[] = { |
@@ -948,7 +947,6 @@ static int init_mediavision(struct pms *dev) | |||
948 | outb(dev->io >> 4, 0x9a01); /* Set IO port */ | 947 | outb(dev->io >> 4, 0x9a01); /* Set IO port */ |
949 | 948 | ||
950 | 949 | ||
951 | id = mvv_read(dev, 3); | ||
952 | decst = pms_i2c_stat(dev, 0x43); | 950 | decst = pms_i2c_stat(dev, 0x43); |
953 | 951 | ||
954 | if (decst != -1) | 952 | if (decst != -1) |
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index ea974fadb5e2..01c2179f0520 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -634,13 +634,11 @@ static void s2255_fillbuff(struct s2255_channel *channel, | |||
634 | const char *tmpbuf; | 634 | const char *tmpbuf; |
635 | char *vbuf = videobuf_to_vmalloc(&buf->vb); | 635 | char *vbuf = videobuf_to_vmalloc(&buf->vb); |
636 | unsigned long last_frame; | 636 | unsigned long last_frame; |
637 | struct s2255_framei *frm; | ||
638 | 637 | ||
639 | if (!vbuf) | 638 | if (!vbuf) |
640 | return; | 639 | return; |
641 | last_frame = channel->last_frame; | 640 | last_frame = channel->last_frame; |
642 | if (last_frame != -1) { | 641 | if (last_frame != -1) { |
643 | frm = &channel->buffer.frame[last_frame]; | ||
644 | tmpbuf = | 642 | tmpbuf = |
645 | (const char *)channel->buffer.frame[last_frame].lpvbits; | 643 | (const char *)channel->buffer.frame[last_frame].lpvbits; |
646 | switch (buf->fmt->fourcc) { | 644 | switch (buf->fmt->fourcc) { |
@@ -987,7 +985,6 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
987 | struct videobuf_queue *q = &fh->vb_vidq; | 985 | struct videobuf_queue *q = &fh->vb_vidq; |
988 | struct s2255_mode mode; | 986 | struct s2255_mode mode; |
989 | int ret; | 987 | int ret; |
990 | int norm; | ||
991 | 988 | ||
992 | ret = vidioc_try_fmt_vid_cap(file, fh, f); | 989 | ret = vidioc_try_fmt_vid_cap(file, fh, f); |
993 | 990 | ||
@@ -1018,7 +1015,6 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
1018 | channel->height = f->fmt.pix.height; | 1015 | channel->height = f->fmt.pix.height; |
1019 | fh->vb_vidq.field = f->fmt.pix.field; | 1016 | fh->vb_vidq.field = f->fmt.pix.field; |
1020 | fh->type = f->type; | 1017 | fh->type = f->type; |
1021 | norm = norm_minw(&channel->vdev); | ||
1022 | if (channel->width > norm_minw(&channel->vdev)) { | 1018 | if (channel->width > norm_minw(&channel->vdev)) { |
1023 | if (channel->height > norm_minh(&channel->vdev)) { | 1019 | if (channel->height > norm_minh(&channel->vdev)) { |
1024 | if (channel->cap_parm.capturemode & | 1020 | if (channel->cap_parm.capturemode & |
diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/video/tm6000/tm6000-input.c index 859eb90e4d56..e80b7e190471 100644 --- a/drivers/media/video/tm6000/tm6000-input.c +++ b/drivers/media/video/tm6000/tm6000-input.c | |||
@@ -168,7 +168,6 @@ static void tm6000_ir_urb_received(struct urb *urb) | |||
168 | struct tm6000_IR *ir = dev->ir; | 168 | struct tm6000_IR *ir = dev->ir; |
169 | struct tm6000_ir_poll_result poll_result; | 169 | struct tm6000_ir_poll_result poll_result; |
170 | char *buf; | 170 | char *buf; |
171 | int rc; | ||
172 | 171 | ||
173 | dprintk(2, "%s\n",__func__); | 172 | dprintk(2, "%s\n",__func__); |
174 | if (urb->status < 0 || urb->actual_length <= 0) { | 173 | if (urb->status < 0 || urb->actual_length <= 0) { |
@@ -192,7 +191,7 @@ static void tm6000_ir_urb_received(struct urb *urb) | |||
192 | dprintk(1, "%s, scancode: 0x%04x\n",__func__, poll_result.rc_data); | 191 | dprintk(1, "%s, scancode: 0x%04x\n",__func__, poll_result.rc_data); |
193 | rc_keydown(ir->rc, poll_result.rc_data, 0); | 192 | rc_keydown(ir->rc, poll_result.rc_data, 0); |
194 | 193 | ||
195 | rc = usb_submit_urb(urb, GFP_ATOMIC); | 194 | usb_submit_urb(urb, GFP_ATOMIC); |
196 | /* | 195 | /* |
197 | * Flash the led. We can't do it here, as it is running on IRQ context. | 196 | * Flash the led. We can't do it here, as it is running on IRQ context. |
198 | * So, use the scheduler to do it, in a few ms. | 197 | * So, use the scheduler to do it, in a few ms. |
diff --git a/drivers/media/video/tm6000/tm6000-stds.c b/drivers/media/video/tm6000/tm6000-stds.c index 9dc0831d813f..5e28d6a2412f 100644 --- a/drivers/media/video/tm6000/tm6000-stds.c +++ b/drivers/media/video/tm6000/tm6000-stds.c | |||
@@ -338,7 +338,6 @@ static int tm6000_set_audio_std(struct tm6000_core *dev) | |||
338 | uint8_t areg_02 = 0x04; /* GC1 Fixed gain 0dB */ | 338 | uint8_t areg_02 = 0x04; /* GC1 Fixed gain 0dB */ |
339 | uint8_t areg_05 = 0x01; /* Auto 4.5 = M Japan, Auto 6.5 = DK */ | 339 | uint8_t areg_05 = 0x01; /* Auto 4.5 = M Japan, Auto 6.5 = DK */ |
340 | uint8_t areg_06 = 0x02; /* Auto de-emphasis, mannual channel mode */ | 340 | uint8_t areg_06 = 0x02; /* Auto de-emphasis, mannual channel mode */ |
341 | uint8_t nicam_flag = 0; /* No NICAM */ | ||
342 | 341 | ||
343 | if (dev->radio) { | 342 | if (dev->radio) { |
344 | tm6000_set_reg(dev, TM6010_REQ08_R01_A_INIT, 0x00); | 343 | tm6000_set_reg(dev, TM6010_REQ08_R01_A_INIT, 0x00); |
@@ -398,7 +397,6 @@ static int tm6000_set_audio_std(struct tm6000_core *dev) | |||
398 | } else { | 397 | } else { |
399 | areg_05 = 0x07; | 398 | areg_05 = 0x07; |
400 | } | 399 | } |
401 | nicam_flag = 1; | ||
402 | break; | 400 | break; |
403 | /* other */ | 401 | /* other */ |
404 | case 3: | 402 | case 3: |
diff --git a/drivers/media/video/tm6000/tm6000-video.c b/drivers/media/video/tm6000/tm6000-video.c index 375f26abd916..f7034df94e0a 100644 --- a/drivers/media/video/tm6000/tm6000-video.c +++ b/drivers/media/video/tm6000/tm6000-video.c | |||
@@ -169,7 +169,6 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q, | |||
169 | struct tm6000_buffer **buf) | 169 | struct tm6000_buffer **buf) |
170 | { | 170 | { |
171 | struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); | 171 | struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); |
172 | char *outp; | ||
173 | 172 | ||
174 | if (list_empty(&dma_q->active)) { | 173 | if (list_empty(&dma_q->active)) { |
175 | dprintk(dev, V4L2_DEBUG_QUEUE, "No active queue to serve\n"); | 174 | dprintk(dev, V4L2_DEBUG_QUEUE, "No active queue to serve\n"); |
@@ -179,11 +178,6 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q, | |||
179 | 178 | ||
180 | *buf = list_entry(dma_q->active.next, | 179 | *buf = list_entry(dma_q->active.next, |
181 | struct tm6000_buffer, vb.queue); | 180 | struct tm6000_buffer, vb.queue); |
182 | |||
183 | /* Cleans up buffer - Useful for testing for frame/URB loss */ | ||
184 | outp = videobuf_to_vmalloc(&(*buf)->vb); | ||
185 | |||
186 | return; | ||
187 | } | 181 | } |
188 | 182 | ||
189 | /* | 183 | /* |
@@ -211,7 +205,7 @@ static int copy_streams(u8 *data, unsigned long len, | |||
211 | { | 205 | { |
212 | struct tm6000_dmaqueue *dma_q = urb->context; | 206 | struct tm6000_dmaqueue *dma_q = urb->context; |
213 | struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); | 207 | struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); |
214 | u8 *ptr = data, *endp = data+len, c; | 208 | u8 *ptr = data, *endp = data+len; |
215 | unsigned long header = 0; | 209 | unsigned long header = 0; |
216 | int rc = 0; | 210 | int rc = 0; |
217 | unsigned int cmd, cpysize, pktsize, size, field, block, line, pos = 0; | 211 | unsigned int cmd, cpysize, pktsize, size, field, block, line, pos = 0; |
@@ -264,7 +258,6 @@ static int copy_streams(u8 *data, unsigned long len, | |||
264 | } | 258 | } |
265 | 259 | ||
266 | /* split the header fields */ | 260 | /* split the header fields */ |
267 | c = (header >> 24) & 0xff; | ||
268 | size = ((header & 0x7e) << 1); | 261 | size = ((header & 0x7e) << 1); |
269 | if (size > 0) | 262 | if (size > 0) |
270 | size -= 4; | 263 | size -= 4; |
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 1326e11cf4a9..476a6a0bd108 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -830,19 +830,12 @@ static int tvp5150_mbus_fmt(struct v4l2_subdev *sd, | |||
830 | struct v4l2_mbus_framefmt *f) | 830 | struct v4l2_mbus_framefmt *f) |
831 | { | 831 | { |
832 | struct tvp5150 *decoder = to_tvp5150(sd); | 832 | struct tvp5150 *decoder = to_tvp5150(sd); |
833 | v4l2_std_id std; | ||
834 | 833 | ||
835 | if (f == NULL) | 834 | if (f == NULL) |
836 | return -EINVAL; | 835 | return -EINVAL; |
837 | 836 | ||
838 | tvp5150_reset(sd, 0); | 837 | tvp5150_reset(sd, 0); |
839 | 838 | ||
840 | /* Calculate height and width based on current standard */ | ||
841 | if (decoder->norm == V4L2_STD_ALL) | ||
842 | std = tvp5150_read_std(sd); | ||
843 | else | ||
844 | std = decoder->norm; | ||
845 | |||
846 | f->width = decoder->rect.width; | 839 | f->width = decoder->rect.width; |
847 | f->height = decoder->rect.height; | 840 | f->height = decoder->rect.height; |
848 | 841 | ||
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c index d7676d85c4df..408b65e782e5 100644 --- a/drivers/media/video/tvp7002.c +++ b/drivers/media/video/tvp7002.c | |||
@@ -670,7 +670,6 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd, | |||
670 | struct v4l2_dv_preset *qpreset) | 670 | struct v4l2_dv_preset *qpreset) |
671 | { | 671 | { |
672 | const struct tvp7002_preset_definition *presets = tvp7002_presets; | 672 | const struct tvp7002_preset_definition *presets = tvp7002_presets; |
673 | struct tvp7002 *device; | ||
674 | u8 progressive; | 673 | u8 progressive; |
675 | u32 lpfr; | 674 | u32 lpfr; |
676 | u32 cpln; | 675 | u32 cpln; |
@@ -684,8 +683,6 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd, | |||
684 | /* Return invalid preset if no active input is detected */ | 683 | /* Return invalid preset if no active input is detected */ |
685 | qpreset->preset = V4L2_DV_INVALID; | 684 | qpreset->preset = V4L2_DV_INVALID; |
686 | 685 | ||
687 | device = to_tvp7002(sd); | ||
688 | |||
689 | /* Read standards from device registers */ | 686 | /* Read standards from device registers */ |
690 | tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_LSBS, &lpf_lsb, &error); | 687 | tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_LSBS, &lpf_lsb, &error); |
691 | tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_MSBS, &lpf_msb, &error); | 688 | tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_MSBS, &lpf_msb, &error); |
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index f344411a4578..c9b2042f8bdf 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -601,13 +601,12 @@ static int usbvision_decompress(struct usb_usbvision *usbvision, unsigned char * | |||
601 | unsigned char *decompressed, int *start_pos, | 601 | unsigned char *decompressed, int *start_pos, |
602 | int *block_typestart_pos, int len) | 602 | int *block_typestart_pos, int len) |
603 | { | 603 | { |
604 | int rest_pixel, idx, max_pos, pos, extra_pos, block_len, block_type_pos, block_type_len; | 604 | int rest_pixel, idx, pos, extra_pos, block_len, block_type_pos, block_type_len; |
605 | unsigned char block_byte, block_code, block_type, block_type_byte, integrator; | 605 | unsigned char block_byte, block_code, block_type, block_type_byte, integrator; |
606 | 606 | ||
607 | integrator = 0; | 607 | integrator = 0; |
608 | pos = *start_pos; | 608 | pos = *start_pos; |
609 | block_type_pos = *block_typestart_pos; | 609 | block_type_pos = *block_typestart_pos; |
610 | max_pos = 396; /* pos + len; */ | ||
611 | extra_pos = pos; | 610 | extra_pos = pos; |
612 | block_len = 0; | 611 | block_len = 0; |
613 | block_byte = 0; | 612 | block_byte = 0; |
@@ -702,7 +701,7 @@ static enum parse_state usbvision_parse_compress(struct usb_usbvision *usbvision | |||
702 | unsigned char strip_data[USBVISION_STRIP_LEN_MAX]; | 701 | unsigned char strip_data[USBVISION_STRIP_LEN_MAX]; |
703 | unsigned char strip_header[USBVISION_STRIP_HEADER_LEN]; | 702 | unsigned char strip_header[USBVISION_STRIP_HEADER_LEN]; |
704 | int idx, idx_end, strip_len, strip_ptr, startblock_pos, block_pos, block_type_pos; | 703 | int idx, idx_end, strip_len, strip_ptr, startblock_pos, block_pos, block_type_pos; |
705 | int clipmask_index, bytes_per_pixel, rc; | 704 | int clipmask_index; |
706 | int image_size; | 705 | int image_size; |
707 | unsigned char rv, gv, bv; | 706 | unsigned char rv, gv, bv; |
708 | static unsigned char *Y, *U, *V; | 707 | static unsigned char *Y, *U, *V; |
@@ -769,7 +768,6 @@ static enum parse_state usbvision_parse_compress(struct usb_usbvision *usbvision | |||
769 | return parse_state_next_frame; | 768 | return parse_state_next_frame; |
770 | } | 769 | } |
771 | 770 | ||
772 | bytes_per_pixel = frame->v4l2_format.bytes_per_pixel; | ||
773 | clipmask_index = frame->curline * MAX_FRAME_WIDTH; | 771 | clipmask_index = frame->curline * MAX_FRAME_WIDTH; |
774 | 772 | ||
775 | scratch_get(usbvision, strip_data, strip_len); | 773 | scratch_get(usbvision, strip_data, strip_len); |
@@ -781,14 +779,14 @@ static enum parse_state usbvision_parse_compress(struct usb_usbvision *usbvision | |||
781 | 779 | ||
782 | usbvision->block_pos = block_pos; | 780 | usbvision->block_pos = block_pos; |
783 | 781 | ||
784 | rc = usbvision_decompress(usbvision, strip_data, Y, &block_pos, &block_type_pos, idx_end); | 782 | usbvision_decompress(usbvision, strip_data, Y, &block_pos, &block_type_pos, idx_end); |
785 | if (strip_len > usbvision->max_strip_len) | 783 | if (strip_len > usbvision->max_strip_len) |
786 | usbvision->max_strip_len = strip_len; | 784 | usbvision->max_strip_len = strip_len; |
787 | 785 | ||
788 | if (frame->curline % 2) | 786 | if (frame->curline % 2) |
789 | rc = usbvision_decompress(usbvision, strip_data, V, &block_pos, &block_type_pos, idx_end / 2); | 787 | usbvision_decompress(usbvision, strip_data, V, &block_pos, &block_type_pos, idx_end / 2); |
790 | else | 788 | else |
791 | rc = usbvision_decompress(usbvision, strip_data, U, &block_pos, &block_type_pos, idx_end / 2); | 789 | usbvision_decompress(usbvision, strip_data, U, &block_pos, &block_type_pos, idx_end / 2); |
792 | 790 | ||
793 | if (block_pos > usbvision->comprblock_pos) | 791 | if (block_pos > usbvision->comprblock_pos) |
794 | usbvision->comprblock_pos = block_pos; | 792 | usbvision->comprblock_pos = block_pos; |
diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/video/zoran/zoran_device.c index e86173bd1327..a4cd504b8eee 100644 --- a/drivers/media/video/zoran/zoran_device.c +++ b/drivers/media/video/zoran/zoran_device.c | |||
@@ -542,11 +542,9 @@ void write_overlay_mask(struct zoran_fh *fh, struct v4l2_clip *vp, int count) | |||
542 | u32 *mask; | 542 | u32 *mask; |
543 | int x, y, width, height; | 543 | int x, y, width, height; |
544 | unsigned i, j, k; | 544 | unsigned i, j, k; |
545 | u32 reg; | ||
546 | 545 | ||
547 | /* fill mask with one bits */ | 546 | /* fill mask with one bits */ |
548 | memset(fh->overlay_mask, ~0, mask_line_size * 4 * BUZ_MAX_HEIGHT); | 547 | memset(fh->overlay_mask, ~0, mask_line_size * 4 * BUZ_MAX_HEIGHT); |
549 | reg = 0; | ||
550 | 548 | ||
551 | for (i = 0; i < count; ++i) { | 549 | for (i = 0; i < count; ++i) { |
552 | /* pick up local copy of clip */ | 550 | /* pick up local copy of clip */ |
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index cd2e39fc4bf0..e44cb330bbc8 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c | |||
@@ -507,14 +507,12 @@ static void zr364xx_fillbuff(struct zr364xx_camera *cam, | |||
507 | const char *tmpbuf; | 507 | const char *tmpbuf; |
508 | char *vbuf = videobuf_to_vmalloc(&buf->vb); | 508 | char *vbuf = videobuf_to_vmalloc(&buf->vb); |
509 | unsigned long last_frame; | 509 | unsigned long last_frame; |
510 | struct zr364xx_framei *frm; | ||
511 | 510 | ||
512 | if (!vbuf) | 511 | if (!vbuf) |
513 | return; | 512 | return; |
514 | 513 | ||
515 | last_frame = cam->last_frame; | 514 | last_frame = cam->last_frame; |
516 | if (last_frame != -1) { | 515 | if (last_frame != -1) { |
517 | frm = &cam->buffer.frame[last_frame]; | ||
518 | tmpbuf = (const char *)cam->buffer.frame[last_frame].lpvbits; | 516 | tmpbuf = (const char *)cam->buffer.frame[last_frame].lpvbits; |
519 | switch (buf->fmt->fourcc) { | 517 | switch (buf->fmt->fourcc) { |
520 | case V4L2_PIX_FMT_JPEG: | 518 | case V4L2_PIX_FMT_JPEG: |
diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 3ef4cd8b4de3..c184ad30fbd8 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c | |||
@@ -76,7 +76,6 @@ static void abort_queued(struct go7007 *go) | |||
76 | 76 | ||
77 | static int go7007_streamoff(struct go7007 *go) | 77 | static int go7007_streamoff(struct go7007 *go) |
78 | { | 78 | { |
79 | int retval = -EINVAL; | ||
80 | unsigned long flags; | 79 | unsigned long flags; |
81 | 80 | ||
82 | mutex_lock(&go->hw_lock); | 81 | mutex_lock(&go->hw_lock); |
@@ -87,7 +86,6 @@ static int go7007_streamoff(struct go7007 *go) | |||
87 | abort_queued(go); | 86 | abort_queued(go); |
88 | spin_unlock_irqrestore(&go->spinlock, flags); | 87 | spin_unlock_irqrestore(&go->spinlock, flags); |
89 | go7007_reset_encoder(go); | 88 | go7007_reset_encoder(go); |
90 | retval = 0; | ||
91 | } | 89 | } |
92 | mutex_unlock(&go->hw_lock); | 90 | mutex_unlock(&go->hw_lock); |
93 | return 0; | 91 | return 0; |