diff mbox

[18/18,media] ti-vpe: Fix typecast

Message ID a77e94eb08a2c8881228d0ed6cb0660a0666493c.1411597610.git.mchehab@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Sept. 24, 2014, 10:27 p.m. UTC
Addresses have the same size of unsigned long, and not u32.

That removes a warning on 64 bits compilation:
drivers/media//platform/ti-vpe/vpdma.c:332:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  WARN_ON(((u32) buf->addr & VPDMA_DESC_ALIGN) != 0);
           ^
include/asm-generic/bug.h:86:25: note: in definition of macro ‘WARN_ON’
  int __ret_warn_on = !!(condition);    \
                         ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff mbox

Patch

diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
index 684ba19bbedd..3e2e3a33e6ed 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -329,7 +329,7 @@  int vpdma_alloc_desc_buf(struct vpdma_buf *buf, size_t size)
 	if (!buf->addr)
 		return -ENOMEM;
 
-	WARN_ON(((u32) buf->addr & VPDMA_DESC_ALIGN) != 0);
+	WARN_ON(((unsigned long)buf->addr & VPDMA_DESC_ALIGN) != 0);
 
 	return 0;
 }