diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-08-21 15:31:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 09:34:13 -0400 |
commit | 3efb8ab6d4f0f38440a819d8302be18596899ebf (patch) | |
tree | 457e490e526666ca5df530512d7cae5432a1ee08 | |
parent | 711c31192057689e59c2a2095d3a7e0fadbfd213 (diff) |
[media] ivtv: fix sparse warnings
drivers/media/pci/ivtv/ivtv-irq.c:195:25: warning: incorrect type in argument 1 (different base types)
drivers/media/pci/ivtv/ivtv-irq.c:199:25: warning: incorrect type in argument 1 (different base types)
drivers/media/pci/ivtv/ivtv-irq.c:278:35: warning: restricted __le32 degrades to integer
drivers/media/pci/ivtv/ivtv-irq.c:281:51: warning: restricted __le32 degrades to integer
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-irq.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-irq.c b/drivers/media/pci/ivtv/ivtv-irq.c index 19a7c9b990a3..ab6d5d25aa6f 100644 --- a/drivers/media/pci/ivtv/ivtv-irq.c +++ b/drivers/media/pci/ivtv/ivtv-irq.c | |||
@@ -192,11 +192,11 @@ static int stream_enc_dma_append(struct ivtv_stream *s, u32 data[CX2341X_MBOX_MA | |||
192 | if (itv->has_cx23415 && (s->type == IVTV_ENC_STREAM_TYPE_PCM || | 192 | if (itv->has_cx23415 && (s->type == IVTV_ENC_STREAM_TYPE_PCM || |
193 | s->type == IVTV_DEC_STREAM_TYPE_VBI)) { | 193 | s->type == IVTV_DEC_STREAM_TYPE_VBI)) { |
194 | s->pending_backup = read_dec(offset - IVTV_DECODER_OFFSET); | 194 | s->pending_backup = read_dec(offset - IVTV_DECODER_OFFSET); |
195 | write_dec_sync(cpu_to_le32(DMA_MAGIC_COOKIE), offset - IVTV_DECODER_OFFSET); | 195 | write_dec_sync(DMA_MAGIC_COOKIE, offset - IVTV_DECODER_OFFSET); |
196 | } | 196 | } |
197 | else { | 197 | else { |
198 | s->pending_backup = read_enc(offset); | 198 | s->pending_backup = read_enc(offset); |
199 | write_enc_sync(cpu_to_le32(DMA_MAGIC_COOKIE), offset); | 199 | write_enc_sync(DMA_MAGIC_COOKIE, offset); |
200 | } | 200 | } |
201 | s->pending_offset = offset; | 201 | s->pending_offset = offset; |
202 | } | 202 | } |
@@ -275,13 +275,11 @@ static void dma_post(struct ivtv_stream *s) | |||
275 | 275 | ||
276 | if (x == 0 && ivtv_use_dma(s)) { | 276 | if (x == 0 && ivtv_use_dma(s)) { |
277 | offset = s->dma_last_offset; | 277 | offset = s->dma_last_offset; |
278 | if (u32buf[offset / 4] != DMA_MAGIC_COOKIE) | 278 | if (le32_to_cpu(u32buf[offset / 4]) != DMA_MAGIC_COOKIE) |
279 | { | 279 | { |
280 | for (offset = 0; offset < 64; offset++) { | 280 | for (offset = 0; offset < 64; offset++) |
281 | if (u32buf[offset] == DMA_MAGIC_COOKIE) { | 281 | if (le32_to_cpu(u32buf[offset]) == DMA_MAGIC_COOKIE) |
282 | break; | 282 | break; |
283 | } | ||
284 | } | ||
285 | offset *= 4; | 283 | offset *= 4; |
286 | if (offset == 256) { | 284 | if (offset == 256) { |
287 | IVTV_DEBUG_WARN("%s: Couldn't find start of buffer within the first 256 bytes\n", s->name); | 285 | IVTV_DEBUG_WARN("%s: Couldn't find start of buffer within the first 256 bytes\n", s->name); |