summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2009-05-09 20:30:05 -0400
committerSteven Toth <stoth@kernellabs.com>2009-05-09 20:30:05 -0400
commita6cf8c7dedb68c4a92402cc2732078b5c8bcac54 (patch)
treeda10cd6ccd1dacabcb149ca50f252169dd36167c /linux/drivers/media/video
parent8ed9b0a29d5966db959676d8522476fbb5baae92 (diff)
downloadmediapointer-dvb-s2-a6cf8c7dedb68c4a92402cc2732078b5c8bcac54.tar.gz
mediapointer-dvb-s2-a6cf8c7dedb68c4a92402cc2732078b5c8bcac54.tar.bz2
SAA7164: Fix some 32/64bit compile time warnings
From: Steven Toth <stoth@kernellabs.com> SAA7164: Fix some 32/64bit compile time warnings Priority: normal Signed-off-by: Steven Toth <stoth@kernellabs.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-api.c4
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-buffer.c15
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-bus.c4
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-core.c20
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-dvb.c12
-rw-r--r--linux/drivers/media/video/saa7164/saa7164.h8
6 files changed, 33 insertions, 30 deletions
diff --git a/linux/drivers/media/video/saa7164/saa7164-api.c b/linux/drivers/media/video/saa7164/saa7164-api.c
index 97b370a25..5232fc45d 100644
--- a/linux/drivers/media/video/saa7164/saa7164-api.c
+++ b/linux/drivers/media/video/saa7164/saa7164-api.c
@@ -136,8 +136,8 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
u32 currpath = 0;
dprintk(DBGLVL_API,
- "%s(?,?,%d) sizeof(tmComResDescrHeader_t) = %lu bytes\n",
- __func__, len, sizeof(tmComResDescrHeader_t));
+ "%s(?,?,%d) sizeof(tmComResDescrHeader_t) = %d bytes\n",
+ __func__, len, (u32)sizeof(tmComResDescrHeader_t));
for (idx = 0; idx < (len - sizeof(tmComResDescrHeader_t)); ) {
diff --git a/linux/drivers/media/video/saa7164/saa7164-buffer.c b/linux/drivers/media/video/saa7164/saa7164-buffer.c
index 2b819cee0..188c5b0f9 100644
--- a/linux/drivers/media/video/saa7164/saa7164-buffer.c
+++ b/linux/drivers/media/video/saa7164/saa7164-buffer.c
@@ -111,18 +111,19 @@ struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_tsport *port,
memset(buf->pt_cpu, 0xff, buf->pt_size);
dprintk(DBGLVL_BUF, "%s() allocated buffer @ 0x%p\n", __func__, buf);
- dprintk(DBGLVL_BUF, " pci_cpu @ 0x%llx dma @ 0x%llx len = 0x%x\n",
- (u64)buf->cpu, (u64)buf->dma, buf->pci_size);
- dprintk(DBGLVL_BUF, " pt_cpu @ 0x%llx pt_dma @ 0x%llx len = 0x%x\n",
- (u64)buf->pt_cpu, (u64)buf->pt_dma, buf->pt_size);
+ dprintk(DBGLVL_BUF, " pci_cpu @ 0x%p dma @ 0x%p len = 0x%x\n",
+ buf->cpu, (void *)buf->dma, buf->pci_size);
+ dprintk(DBGLVL_BUF, " pt_cpu @ 0x%p pt_dma @ 0x%p len = 0x%x\n",
+ buf->pt_cpu, (void *)buf->pt_dma, buf->pt_size);
/* Format the Page Table Entries to point into the data buffer */
for (i = 0 ; i < SAA7164_PT_ENTRIES; i++) {
*(buf->pt_cpu + i) = buf->dma + (i * 0x1000); /* TODO */
-
- dprintk(DBGLVL_BUF, " pt[%02d] = 0x%llx -> 0x%llx\n",
- i, (u64)buf->pt_cpu, (u64)*(buf->pt_cpu));
+#if 0
+ dprintk(DBGLVL_BUF, " pt[%02d] = 0x%p -> 0x%llx\n",
+ i, buf->pt_cpu, (u64)*(buf->pt_cpu));
+#endif
}
diff --git a/linux/drivers/media/video/saa7164/saa7164-bus.c b/linux/drivers/media/video/saa7164/saa7164-bus.c
index 28f630dc4..8d813f5b5 100644
--- a/linux/drivers/media/video/saa7164/saa7164-bus.c
+++ b/linux/drivers/media/video/saa7164/saa7164-bus.c
@@ -210,8 +210,8 @@ int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf)
dprintk(DBGLVL_BUS, "%s() space_rem = %x\n", __func__,
space_rem);
- dprintk(DBGLVL_BUS, "%s() sizeof(*msg) = %lu\n", __func__,
- sizeof(*msg));
+ dprintk(DBGLVL_BUS, "%s() sizeof(*msg) = %d\n", __func__,
+ (u32)sizeof(*msg));
if (space_rem < sizeof(*msg)) {
dprintk(DBGLVL_BUS, "%s() tr4\n", __func__);
diff --git a/linux/drivers/media/video/saa7164/saa7164-core.c b/linux/drivers/media/video/saa7164/saa7164-core.c
index a657aca49..abb070885 100644
--- a/linux/drivers/media/video/saa7164/saa7164-core.c
+++ b/linux/drivers/media/video/saa7164/saa7164-core.c
@@ -319,8 +319,8 @@ void saa7164_dumpregs(struct saa7164_dev *dev, u32 addr)
static void saa7164_dump_hwdesc(struct saa7164_dev *dev)
{
- dprintk(1, "@0x%p hwdesc sizeof(tmComResHWDescr_t) = %lu bytes\n",
- &dev->hwdesc, sizeof(tmComResHWDescr_t));
+ dprintk(1, "@0x%p hwdesc sizeof(tmComResHWDescr_t) = %d bytes\n",
+ &dev->hwdesc, (u32)sizeof(tmComResHWDescr_t));
dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength);
dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType);
@@ -350,8 +350,8 @@ static void saa7164_dump_hwdesc(struct saa7164_dev *dev)
static void saa7164_dump_intfdesc(struct saa7164_dev *dev)
{
dprintk(1, "@0x%p intfdesc "
- "sizeof(tmComResInterfaceDescr_t) = %lu bytes\n",
- &dev->intfdesc, sizeof(tmComResInterfaceDescr_t));
+ "sizeof(tmComResInterfaceDescr_t) = %d bytes\n",
+ &dev->intfdesc, (u32)sizeof(tmComResInterfaceDescr_t));
dprintk(1, " .bLength = 0x%x\n", dev->intfdesc.bLength);
dprintk(1, " .bDescriptorType = 0x%x\n", dev->intfdesc.bDescriptorType);
@@ -371,8 +371,8 @@ static void saa7164_dump_intfdesc(struct saa7164_dev *dev)
static void saa7164_dump_busdesc(struct saa7164_dev *dev)
{
- dprintk(1, "@0x%p busdesc sizeof(tmComResBusDescr_t) = %lu bytes\n",
- &dev->busdesc, sizeof(tmComResBusDescr_t));
+ dprintk(1, "@0x%p busdesc sizeof(tmComResBusDescr_t) = %d bytes\n",
+ &dev->busdesc, (u32)sizeof(tmComResBusDescr_t));
dprintk(1, " .CommandRing = 0x%016Lx\n", dev->busdesc.CommandRing);
dprintk(1, " .ResponseRing = 0x%016Lx\n", dev->busdesc.ResponseRing);
@@ -397,15 +397,15 @@ static void saa7164_get_descriptors(struct saa7164_dev *dev)
if (dev->hwdesc.bLength != sizeof(tmComResHWDescr_t)) {
printk(KERN_ERR "Structure tmComResHWDescr_t is mangled\n");
- printk(KERN_ERR "Need %x got %lu\n", dev->hwdesc.bLength,
- sizeof(tmComResHWDescr_t));
+ printk(KERN_ERR "Need %x got %d\n", dev->hwdesc.bLength,
+ (u32)sizeof(tmComResHWDescr_t));
} else
saa7164_dump_hwdesc(dev);
if (dev->intfdesc.bLength != sizeof(tmComResInterfaceDescr_t)) {
printk(KERN_ERR "struct tmComResInterfaceDescr_t is mangled\n");
- printk(KERN_ERR "Need %x got %lu\n", dev->intfdesc.bLength,
- sizeof(tmComResInterfaceDescr_t));
+ printk(KERN_ERR "Need %x got %d\n", dev->intfdesc.bLength,
+ (u32)sizeof(tmComResInterfaceDescr_t));
} else
saa7164_dump_intfdesc(dev);
diff --git a/linux/drivers/media/video/saa7164/saa7164-dvb.c b/linux/drivers/media/video/saa7164/saa7164-dvb.c
index 2a53f28e1..429bc2b91 100644
--- a/linux/drivers/media/video/saa7164/saa7164-dvb.c
+++ b/linux/drivers/media/video/saa7164/saa7164-dvb.c
@@ -151,7 +151,7 @@ static int saa7164_dvb_cfg_tsport(struct saa7164_tsport *port)
saa7164_writel(port->bufsize, params->pitch * params->numberoflines);
dprintk(DBGLVL_DVB, " configured:\n");
- dprintk(DBGLVL_DVB, " lmmio 0x%llx\n", (u64)dev->lmmio);
+ dprintk(DBGLVL_DVB, " lmmio 0x%p\n", dev->lmmio);
dprintk(DBGLVL_DVB, " bufcounter 0x%x = 0x%x\n", port->bufcounter,
saa7164_readl(port->bufcounter));
@@ -178,13 +178,13 @@ static int saa7164_dvb_cfg_tsport(struct saa7164_tsport *port)
saa7164_writel(port->bufptr32l + ((sizeof(u32) * 2) * i), 0);
dprintk(DBGLVL_DVB,
- " buf[%d] offset 0x%lx (0x%x) "
- "buf 0x%lx/%lx (0x%x/%x)\n",
+ " buf[%d] offset 0x%llx (0x%x) "
+ "buf 0x%llx/%llx (0x%x/%x)\n",
i,
- port->bufoffset + (i * sizeof(u32)),
+ (u64)port->bufoffset + (i * sizeof(u32)),
saa7164_readl(port->bufoffset + (sizeof(u32) * i)),
- port->bufptr32h + ((sizeof(u32) * 2) * i),
- port->bufptr32l + ((sizeof(u32) * 2) * i),
+ (u64)port->bufptr32h + ((sizeof(u32) * 2) * i),
+ (u64)port->bufptr32l + ((sizeof(u32) * 2) * i),
saa7164_readl(port->bufptr32h + ((sizeof(u32) * i)
* 2)),
saa7164_readl(port->bufptr32l + ((sizeof(u32) * i)
diff --git a/linux/drivers/media/video/saa7164/saa7164.h b/linux/drivers/media/video/saa7164/saa7164.h
index ba4c69bdb..ce1717120 100644
--- a/linux/drivers/media/video/saa7164/saa7164.h
+++ b/linux/drivers/media/video/saa7164/saa7164.h
@@ -391,14 +391,16 @@ extern unsigned int debug;
} while (0)
#define saa7164_readl(reg) readl(dev->lmmio + ((reg) >> 2))
-#if 0
#define saa7164_writel(reg, value) writel((value), dev->lmmio + ((reg) >> 2))
-#endif
+
+#if 0
#define saa7164_writel(reg, value) \
do { \
- printk(KERN_ERR "writel(%x, %llx)\n", value, (u64)(dev->lmmio + ((reg) >> 2))); \
+ printk(KERN_ERR "writel(%x, %llx)\n", value, \
+ (u64)((u32)dev->lmmio + ((reg) >> 2))); \
writel((value), dev->lmmio + ((reg) >> 2)); \
} while (0)
+#endif
#define saa7164_readb(reg) readl(dev->bmmio + (reg))
#define saa7164_writeb(reg, value) writel((value), dev->bmmio + (reg))