From: Sujoy Gupta Date: Sat, 30 Sep 2006 09:55:29 +0000 (-0300) Subject: V4L/DVB (4685): Fix compiler warning in drivers/media/video/video-buf.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6eb32a792ec19816d68529805f8169ce3ba1b1a2;p=openwrt%2Fstaging%2Fblogic.git V4L/DVB (4685): Fix compiler warning in drivers/media/video/video-buf.c 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. Signed-off-by: Martin J. Bligh Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index acc5ea936687..f429f49901b9 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c @@ -365,7 +365,12 @@ videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb, 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)(unsigned long)fbuf->base + vb->boff; pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT; err = videobuf_dma_init_overlay(&vb->dma,PCI_DMA_FROMDEVICE, bus, pages);