From 471be2a7a8396a9654276c584d96a682e5e8cfa3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 30 Sep 2006 06:55:29 -0300 Subject: fix compiler warning in drivers/media/video/video-buf.c From: Sujoy Gupta 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 --- linux/drivers/media/video/video-buf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c index 05532ee28..f1e7f298b 100644 --- a/linux/drivers/media/video/video-buf.c +++ b/linux/drivers/media/video/video-buf.c @@ -366,7 +366,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); -- cgit v1.2.3