aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-12-01 06:32:54 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-02 08:35:05 -0500
commite8bd888a148cb55a5ba27070fdfeb62386c89577 (patch)
tree9abe1d533c4f04fb47eed8da85b82d8957435477
parentb41a97a292016ab92325257a8b9050d42f89a508 (diff)
[media] omap_vout: fix compile warnings
When compiling under COMPILE_TEST on a x86_64 the following warnings appear: drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_uservirt_to_phys': drivers/media/platform/omap/omap_vout.c:209:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] return virt_to_phys((void *) virtp); ^ drivers/media/platform/omap/omap_vout.c: In function 'omapvid_setup_overlay': drivers/media/platform/omap/omap_vout.c:420:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, ^ drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_buffer_prepare': drivers/media/platform/omap/omap_vout.c:794:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] vout->queued_buf_addr[vb->i] = (u8 *) ^ In file included from arch/x86/include/asm/dma-mapping.h:44:0, from include/linux/dma-mapping.h:82, from drivers/media/platform/omap/omap_vout.c:40: drivers/media/platform/omap/omap_vout.c:803:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] dma_addr = dma_map_single(vout->vid_dev->v4l2_dev.dev, (void *) addr, ^ include/asm-generic/dma-mapping-common.h:174:60: note: in definition of macro 'dma_map_single' #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL) ^ These are fixed by this patch. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/platform/omap/omap_vout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
index d39e2b4027be..ba2d8f973d58 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -198,7 +198,7 @@ static int omap_vout_try_format(struct v4l2_pix_format *pix)
198 * omap_vout_uservirt_to_phys: This inline function is used to convert user 198 * omap_vout_uservirt_to_phys: This inline function is used to convert user
199 * space virtual address to physical address. 199 * space virtual address to physical address.
200 */ 200 */
201static u32 omap_vout_uservirt_to_phys(u32 virtp) 201static unsigned long omap_vout_uservirt_to_phys(unsigned long virtp)
202{ 202{
203 unsigned long physp = 0; 203 unsigned long physp = 0;
204 struct vm_area_struct *vma; 204 struct vm_area_struct *vma;
@@ -418,10 +418,10 @@ static int omapvid_setup_overlay(struct omap_vout_device *vout,
418 } 418 }
419 419
420 v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, 420 v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev,
421 "%s enable=%d addr=%x width=%d\n height=%d color_mode=%d\n" 421 "%s enable=%d addr=%pad width=%d\n height=%d color_mode=%d\n"
422 "rotation=%d mirror=%d posx=%d posy=%d out_width = %d \n" 422 "rotation=%d mirror=%d posx=%d posy=%d out_width = %d \n"
423 "out_height=%d rotation_type=%d screen_width=%d\n", 423 "out_height=%d rotation_type=%d screen_width=%d\n",
424 __func__, ovl->is_enabled(ovl), info.paddr, info.width, info.height, 424 __func__, ovl->is_enabled(ovl), &info.paddr, info.width, info.height,
425 info.color_mode, info.rotation, info.mirror, info.pos_x, 425 info.color_mode, info.rotation, info.mirror, info.pos_x,
426 info.pos_y, info.out_width, info.out_height, info.rotation_type, 426 info.pos_y, info.out_width, info.out_height, info.rotation_type,
427 info.screen_width); 427 info.screen_width);
@@ -794,7 +794,7 @@ static int omap_vout_buffer_prepare(struct videobuf_queue *q,
794 vout->queued_buf_addr[vb->i] = (u8 *) 794 vout->queued_buf_addr[vb->i] = (u8 *)
795 omap_vout_uservirt_to_phys(vb->baddr); 795 omap_vout_uservirt_to_phys(vb->baddr);
796 } else { 796 } else {
797 u32 addr, dma_addr; 797 unsigned long addr, dma_addr;
798 unsigned long size; 798 unsigned long size;
799 799
800 addr = (unsigned long) vout->buf_virt_addr[vb->i]; 800 addr = (unsigned long) vout->buf_virt_addr[vb->i];