Commit 3fce3fb0 authored by David Howells's avatar David Howells Committed by Mauro Carvalho Chehab

V4L/DVB (8249): Fix pointer cast warnings in the ivtv framebuffer driver

Fix casts of pointers to integers of different sizes in the ivtv framebuffer
driver.

These were introduced in patch 38eb6ba5b8487d15b020fe391d324edd2b659b03.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 5a367dfb
...@@ -417,10 +417,11 @@ static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf, ...@@ -417,10 +417,11 @@ static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf,
if (!err) { if (!err) {
/* If transfer size > threshold and both src/dst /* If transfer size > threshold and both src/dst
addresses are aligned, use DMA */ addresses are aligned, use DMA */
if (count >= 4096 && ((u32)buf & 3) == ((u32)dst & 3)) { if (count >= 4096 &&
((unsigned long)buf & 3) == ((unsigned long)dst & 3)) {
/* Odd address = can't DMA. Align */ /* Odd address = can't DMA. Align */
if ((u32)dst & 3) { if ((unsigned long)dst & 3) {
lead = 4 - ((u32)dst & 3); lead = 4 - ((unsigned long)dst & 3);
memcpy(dst, buf, lead); memcpy(dst, buf, lead);
buf += lead; buf += lead;
dst += lead; dst += lead;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment