Commit 60519af3 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] lirc_dev: fix sparse warnings

drivers/media/rc/lirc_dev.c:598:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:606:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:616:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:625:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:634:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:643:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:739:45: warning: cast removes address space of expression
drivers/media/rc/lirc_dev.c:739:58: warning: incorrect type in argument 1 (different address spaces)
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 4d1afa51
...@@ -595,7 +595,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -595,7 +595,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
switch (cmd) { switch (cmd) {
case LIRC_GET_FEATURES: case LIRC_GET_FEATURES:
result = put_user(ir->d.features, (__u32 *)arg); result = put_user(ir->d.features, (__u32 __user *)arg);
break; break;
case LIRC_GET_REC_MODE: case LIRC_GET_REC_MODE:
if (!(ir->d.features & LIRC_CAN_REC_MASK)) { if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
...@@ -605,7 +605,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -605,7 +605,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
result = put_user(LIRC_REC2MODE result = put_user(LIRC_REC2MODE
(ir->d.features & LIRC_CAN_REC_MASK), (ir->d.features & LIRC_CAN_REC_MASK),
(__u32 *)arg); (__u32 __user *)arg);
break; break;
case LIRC_SET_REC_MODE: case LIRC_SET_REC_MODE:
if (!(ir->d.features & LIRC_CAN_REC_MASK)) { if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
...@@ -613,7 +613,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -613,7 +613,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break; break;
} }
result = get_user(mode, (__u32 *)arg); result = get_user(mode, (__u32 __user *)arg);
if (!result && !(LIRC_MODE2REC(mode) & ir->d.features)) if (!result && !(LIRC_MODE2REC(mode) & ir->d.features))
result = -EINVAL; result = -EINVAL;
/* /*
...@@ -622,7 +622,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -622,7 +622,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
*/ */
break; break;
case LIRC_GET_LENGTH: case LIRC_GET_LENGTH:
result = put_user(ir->d.code_length, (__u32 *)arg); result = put_user(ir->d.code_length, (__u32 __user *)arg);
break; break;
case LIRC_GET_MIN_TIMEOUT: case LIRC_GET_MIN_TIMEOUT:
if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) || if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
...@@ -631,7 +631,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -631,7 +631,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break; break;
} }
result = put_user(ir->d.min_timeout, (__u32 *)arg); result = put_user(ir->d.min_timeout, (__u32 __user *)arg);
break; break;
case LIRC_GET_MAX_TIMEOUT: case LIRC_GET_MAX_TIMEOUT:
if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) || if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
...@@ -640,7 +640,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -640,7 +640,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break; break;
} }
result = put_user(ir->d.max_timeout, (__u32 *)arg); result = put_user(ir->d.max_timeout, (__u32 __user *)arg);
break; break;
default: default:
result = -EINVAL; result = -EINVAL;
...@@ -736,7 +736,7 @@ ssize_t lirc_dev_fop_read(struct file *file, ...@@ -736,7 +736,7 @@ ssize_t lirc_dev_fop_read(struct file *file,
} }
} else { } else {
lirc_buffer_read(ir->buf, buf); lirc_buffer_read(ir->buf, buf);
ret = copy_to_user((void *)buffer+written, buf, ret = copy_to_user((void __user *)buffer+written, buf,
ir->buf->chunk_size); ir->buf->chunk_size);
if (!ret) if (!ret)
written += ir->buf->chunk_size; written += ir->buf->chunk_size;
......
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