Using a double cast to avoid compiler warnings when
building for PAE. Compiler doesn't like direct casting
of a 32 bit ptr to 64 bit integer.
From: Sujoy Gupta <[email protected]>
Signed-off-by: Martin J. Bligh <[email protected]>
diff -aurpN -X /home/mbligh/.diff.exclude linux-2.6.18/drivers/media/video/video-buf.c 2.6.18-videobuf/drivers/media/video/video-buf.c
--- linux-2.6.18/drivers/media/video/video-buf.c 2006-06-17 18:49:35.000000000 -0700
+++ 2.6.18-videobuf/drivers/media/video/video-buf.c 2006-09-28 10:28:54.000000000 -0700
@@ -365,7 +365,12 @@ videobuf_iolock(struct videobuf_queue* q
if (NULL == fbuf)
return -EINVAL;
/* FIXME: need sanity checks for vb->boff */
- bus = (dma_addr_t)fbuf->base + vb->boff;
+ /*
+ * Using a double cast to avoid compiler warnings when
+ * building for PAE. Compiler doesn't like direct casting
+ * of a 32 bit ptr to 64 bit integer.
+ */
+ bus = (dma_addr_t)(size_t)fbuf->base + vb->boff;
pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT;
err = videobuf_dma_init_overlay(&vb->dma,PCI_DMA_FROMDEVICE,
bus, pages);
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]