diff options
author | Steven Toth <stoth@kernellabs.com> | 2009-05-09 20:30:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:14:47 -0400 |
commit | 207b42c492cc335806957c139381eb260a808837 (patch) | |
tree | 341dbc4033f8e743664195d12c92b210ab00e672 /drivers/media/video/saa7164 | |
parent | 443c1228d50518f3c550e1fef490a2c9d9246ce7 (diff) |
V4L/DVB (12924): SAA7164: Fix some 32/64bit compile time warnings
SAA7164: Fix some 32/64bit compile time warnings
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-api.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-buffer.c | 11 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-bus.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-core.c | 20 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-dvb.c | 12 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164.h | 7 |
6 files changed, 26 insertions, 32 deletions
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index 8cef1df9b54f..105b68ef61e6 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c | |||
@@ -129,8 +129,8 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
129 | u32 currpath = 0; | 129 | u32 currpath = 0; |
130 | 130 | ||
131 | dprintk(DBGLVL_API, | 131 | dprintk(DBGLVL_API, |
132 | "%s(?,?,%d) sizeof(tmComResDescrHeader_t) = %lu bytes\n", | 132 | "%s(?,?,%d) sizeof(tmComResDescrHeader_t) = %d bytes\n", |
133 | __func__, len, sizeof(tmComResDescrHeader_t)); | 133 | __func__, len, (u32)sizeof(tmComResDescrHeader_t)); |
134 | 134 | ||
135 | for (idx = 0; idx < (len - sizeof(tmComResDescrHeader_t)); ) { | 135 | for (idx = 0; idx < (len - sizeof(tmComResDescrHeader_t)); ) { |
136 | 136 | ||
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c index 4176544ee019..240c6dcb4961 100644 --- a/drivers/media/video/saa7164/saa7164-buffer.c +++ b/drivers/media/video/saa7164/saa7164-buffer.c | |||
@@ -107,19 +107,16 @@ struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_tsport *port, | |||
107 | memset(buf->pt_cpu, 0xff, buf->pt_size); | 107 | memset(buf->pt_cpu, 0xff, buf->pt_size); |
108 | 108 | ||
109 | dprintk(DBGLVL_BUF, "%s() allocated buffer @ 0x%p\n", __func__, buf); | 109 | dprintk(DBGLVL_BUF, "%s() allocated buffer @ 0x%p\n", __func__, buf); |
110 | dprintk(DBGLVL_BUF, " pci_cpu @ 0x%llx dma @ 0x%llx len = 0x%x\n", | 110 | dprintk(DBGLVL_BUF, " pci_cpu @ 0x%p dma @ 0x%p len = 0x%x\n", |
111 | (u64)buf->cpu, (u64)buf->dma, buf->pci_size); | 111 | buf->cpu, (void *)buf->dma, buf->pci_size); |
112 | dprintk(DBGLVL_BUF, " pt_cpu @ 0x%llx pt_dma @ 0x%llx len = 0x%x\n", | 112 | dprintk(DBGLVL_BUF, " pt_cpu @ 0x%p pt_dma @ 0x%p len = 0x%x\n", |
113 | (u64)buf->pt_cpu, (u64)buf->pt_dma, buf->pt_size); | 113 | buf->pt_cpu, (void *)buf->pt_dma, buf->pt_size); |
114 | 114 | ||
115 | /* Format the Page Table Entries to point into the data buffer */ | 115 | /* Format the Page Table Entries to point into the data buffer */ |
116 | for (i = 0 ; i < SAA7164_PT_ENTRIES; i++) { | 116 | for (i = 0 ; i < SAA7164_PT_ENTRIES; i++) { |
117 | 117 | ||
118 | *(buf->pt_cpu + i) = buf->dma + (i * 0x1000); /* TODO */ | 118 | *(buf->pt_cpu + i) = buf->dma + (i * 0x1000); /* TODO */ |
119 | 119 | ||
120 | dprintk(DBGLVL_BUF, " pt[%02d] = 0x%llx -> 0x%llx\n", | ||
121 | i, (u64)buf->pt_cpu, (u64)*(buf->pt_cpu)); | ||
122 | |||
123 | } | 120 | } |
124 | 121 | ||
125 | goto ret; | 122 | goto ret; |
diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/video/saa7164/saa7164-bus.c index 28f630dc49c9..8d813f5b54a8 100644 --- a/drivers/media/video/saa7164/saa7164-bus.c +++ b/drivers/media/video/saa7164/saa7164-bus.c | |||
@@ -210,8 +210,8 @@ int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf) | |||
210 | dprintk(DBGLVL_BUS, "%s() space_rem = %x\n", __func__, | 210 | dprintk(DBGLVL_BUS, "%s() space_rem = %x\n", __func__, |
211 | space_rem); | 211 | space_rem); |
212 | 212 | ||
213 | dprintk(DBGLVL_BUS, "%s() sizeof(*msg) = %lu\n", __func__, | 213 | dprintk(DBGLVL_BUS, "%s() sizeof(*msg) = %d\n", __func__, |
214 | sizeof(*msg)); | 214 | (u32)sizeof(*msg)); |
215 | 215 | ||
216 | if (space_rem < sizeof(*msg)) { | 216 | if (space_rem < sizeof(*msg)) { |
217 | dprintk(DBGLVL_BUS, "%s() tr4\n", __func__); | 217 | dprintk(DBGLVL_BUS, "%s() tr4\n", __func__); |
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index 04957090f83e..4b155a3d6c16 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c | |||
@@ -281,8 +281,8 @@ void saa7164_dumpregs(struct saa7164_dev *dev, u32 addr) | |||
281 | 281 | ||
282 | static void saa7164_dump_hwdesc(struct saa7164_dev *dev) | 282 | static void saa7164_dump_hwdesc(struct saa7164_dev *dev) |
283 | { | 283 | { |
284 | dprintk(1, "@0x%p hwdesc sizeof(tmComResHWDescr_t) = %lu bytes\n", | 284 | dprintk(1, "@0x%p hwdesc sizeof(tmComResHWDescr_t) = %d bytes\n", |
285 | &dev->hwdesc, sizeof(tmComResHWDescr_t)); | 285 | &dev->hwdesc, (u32)sizeof(tmComResHWDescr_t)); |
286 | 286 | ||
287 | dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength); | 287 | dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength); |
288 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType); | 288 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType); |
@@ -312,8 +312,8 @@ static void saa7164_dump_hwdesc(struct saa7164_dev *dev) | |||
312 | static void saa7164_dump_intfdesc(struct saa7164_dev *dev) | 312 | static void saa7164_dump_intfdesc(struct saa7164_dev *dev) |
313 | { | 313 | { |
314 | dprintk(1, "@0x%p intfdesc " | 314 | dprintk(1, "@0x%p intfdesc " |
315 | "sizeof(tmComResInterfaceDescr_t) = %lu bytes\n", | 315 | "sizeof(tmComResInterfaceDescr_t) = %d bytes\n", |
316 | &dev->intfdesc, sizeof(tmComResInterfaceDescr_t)); | 316 | &dev->intfdesc, (u32)sizeof(tmComResInterfaceDescr_t)); |
317 | 317 | ||
318 | dprintk(1, " .bLength = 0x%x\n", dev->intfdesc.bLength); | 318 | dprintk(1, " .bLength = 0x%x\n", dev->intfdesc.bLength); |
319 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->intfdesc.bDescriptorType); | 319 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->intfdesc.bDescriptorType); |
@@ -333,8 +333,8 @@ static void saa7164_dump_intfdesc(struct saa7164_dev *dev) | |||
333 | 333 | ||
334 | static void saa7164_dump_busdesc(struct saa7164_dev *dev) | 334 | static void saa7164_dump_busdesc(struct saa7164_dev *dev) |
335 | { | 335 | { |
336 | dprintk(1, "@0x%p busdesc sizeof(tmComResBusDescr_t) = %lu bytes\n", | 336 | dprintk(1, "@0x%p busdesc sizeof(tmComResBusDescr_t) = %d bytes\n", |
337 | &dev->busdesc, sizeof(tmComResBusDescr_t)); | 337 | &dev->busdesc, (u32)sizeof(tmComResBusDescr_t)); |
338 | 338 | ||
339 | dprintk(1, " .CommandRing = 0x%016Lx\n", dev->busdesc.CommandRing); | 339 | dprintk(1, " .CommandRing = 0x%016Lx\n", dev->busdesc.CommandRing); |
340 | dprintk(1, " .ResponseRing = 0x%016Lx\n", dev->busdesc.ResponseRing); | 340 | dprintk(1, " .ResponseRing = 0x%016Lx\n", dev->busdesc.ResponseRing); |
@@ -359,15 +359,15 @@ static void saa7164_get_descriptors(struct saa7164_dev *dev) | |||
359 | 359 | ||
360 | if (dev->hwdesc.bLength != sizeof(tmComResHWDescr_t)) { | 360 | if (dev->hwdesc.bLength != sizeof(tmComResHWDescr_t)) { |
361 | printk(KERN_ERR "Structure tmComResHWDescr_t is mangled\n"); | 361 | printk(KERN_ERR "Structure tmComResHWDescr_t is mangled\n"); |
362 | printk(KERN_ERR "Need %x got %lu\n", dev->hwdesc.bLength, | 362 | printk(KERN_ERR "Need %x got %d\n", dev->hwdesc.bLength, |
363 | sizeof(tmComResHWDescr_t)); | 363 | (u32)sizeof(tmComResHWDescr_t)); |
364 | } else | 364 | } else |
365 | saa7164_dump_hwdesc(dev); | 365 | saa7164_dump_hwdesc(dev); |
366 | 366 | ||
367 | if (dev->intfdesc.bLength != sizeof(tmComResInterfaceDescr_t)) { | 367 | if (dev->intfdesc.bLength != sizeof(tmComResInterfaceDescr_t)) { |
368 | printk(KERN_ERR "struct tmComResInterfaceDescr_t is mangled\n"); | 368 | printk(KERN_ERR "struct tmComResInterfaceDescr_t is mangled\n"); |
369 | printk(KERN_ERR "Need %x got %lu\n", dev->intfdesc.bLength, | 369 | printk(KERN_ERR "Need %x got %d\n", dev->intfdesc.bLength, |
370 | sizeof(tmComResInterfaceDescr_t)); | 370 | (u32)sizeof(tmComResInterfaceDescr_t)); |
371 | } else | 371 | } else |
372 | saa7164_dump_intfdesc(dev); | 372 | saa7164_dump_intfdesc(dev); |
373 | 373 | ||
diff --git a/drivers/media/video/saa7164/saa7164-dvb.c b/drivers/media/video/saa7164/saa7164-dvb.c index f21520f5979e..271962db107a 100644 --- a/drivers/media/video/saa7164/saa7164-dvb.c +++ b/drivers/media/video/saa7164/saa7164-dvb.c | |||
@@ -151,7 +151,7 @@ static int saa7164_dvb_cfg_tsport(struct saa7164_tsport *port) | |||
151 | saa7164_writel(port->bufsize, params->pitch * params->numberoflines); | 151 | saa7164_writel(port->bufsize, params->pitch * params->numberoflines); |
152 | 152 | ||
153 | dprintk(DBGLVL_DVB, " configured:\n"); | 153 | dprintk(DBGLVL_DVB, " configured:\n"); |
154 | dprintk(DBGLVL_DVB, " lmmio 0x%llx\n", (u64)dev->lmmio); | 154 | dprintk(DBGLVL_DVB, " lmmio 0x%p\n", dev->lmmio); |
155 | dprintk(DBGLVL_DVB, " bufcounter 0x%x = 0x%x\n", port->bufcounter, | 155 | dprintk(DBGLVL_DVB, " bufcounter 0x%x = 0x%x\n", port->bufcounter, |
156 | saa7164_readl(port->bufcounter)); | 156 | saa7164_readl(port->bufcounter)); |
157 | 157 | ||
@@ -178,13 +178,13 @@ static int saa7164_dvb_cfg_tsport(struct saa7164_tsport *port) | |||
178 | saa7164_writel(port->bufptr32l + ((sizeof(u32) * 2) * i), 0); | 178 | saa7164_writel(port->bufptr32l + ((sizeof(u32) * 2) * i), 0); |
179 | 179 | ||
180 | dprintk(DBGLVL_DVB, | 180 | dprintk(DBGLVL_DVB, |
181 | " buf[%d] offset 0x%lx (0x%x) " | 181 | " buf[%d] offset 0x%llx (0x%x) " |
182 | "buf 0x%lx/%lx (0x%x/%x)\n", | 182 | "buf 0x%llx/%llx (0x%x/%x)\n", |
183 | i, | 183 | i, |
184 | port->bufoffset + (i * sizeof(u32)), | 184 | (u64)port->bufoffset + (i * sizeof(u32)), |
185 | saa7164_readl(port->bufoffset + (sizeof(u32) * i)), | 185 | saa7164_readl(port->bufoffset + (sizeof(u32) * i)), |
186 | port->bufptr32h + ((sizeof(u32) * 2) * i), | 186 | (u64)port->bufptr32h + ((sizeof(u32) * 2) * i), |
187 | port->bufptr32l + ((sizeof(u32) * 2) * i), | 187 | (u64)port->bufptr32l + ((sizeof(u32) * 2) * i), |
188 | saa7164_readl(port->bufptr32h + ((sizeof(u32) * i) | 188 | saa7164_readl(port->bufptr32h + ((sizeof(u32) * i) |
189 | * 2)), | 189 | * 2)), |
190 | saa7164_readl(port->bufptr32l + ((sizeof(u32) * i) | 190 | saa7164_readl(port->bufptr32l + ((sizeof(u32) * i) |
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index ed38118ffde5..338804f6cd57 100644 --- a/drivers/media/video/saa7164/saa7164.h +++ b/drivers/media/video/saa7164/saa7164.h | |||
@@ -390,11 +390,8 @@ extern unsigned int debug; | |||
390 | } while (0) | 390 | } while (0) |
391 | 391 | ||
392 | #define saa7164_readl(reg) readl(dev->lmmio + ((reg) >> 2)) | 392 | #define saa7164_readl(reg) readl(dev->lmmio + ((reg) >> 2)) |
393 | #define saa7164_writel(reg, value) \ | 393 | #define saa7164_writel(reg, value) writel((value), dev->lmmio + ((reg) >> 2)) |
394 | do { \ | 394 | |
395 | printk(KERN_ERR "writel(%x, %llx)\n", value, (u64)(dev->lmmio + ((reg) >> 2))); \ | ||
396 | writel((value), dev->lmmio + ((reg) >> 2)); \ | ||
397 | } while (0) | ||
398 | 395 | ||
399 | #define saa7164_readb(reg) readl(dev->bmmio + (reg)) | 396 | #define saa7164_readb(reg) readl(dev->bmmio + (reg)) |
400 | #define saa7164_writeb(reg, value) writel((value), dev->bmmio + (reg)) | 397 | #define saa7164_writeb(reg, value) writel((value), dev->bmmio + (reg)) |