mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 04:26:41 +07:00
[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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
4d1afa51e9
commit
60519af3fd
@ -595,7 +595,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
|
||||
switch (cmd) {
|
||||
case LIRC_GET_FEATURES:
|
||||
result = put_user(ir->d.features, (__u32 *)arg);
|
||||
result = put_user(ir->d.features, (__u32 __user *)arg);
|
||||
break;
|
||||
case LIRC_GET_REC_MODE:
|
||||
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)
|
||||
|
||||
result = put_user(LIRC_REC2MODE
|
||||
(ir->d.features & LIRC_CAN_REC_MASK),
|
||||
(__u32 *)arg);
|
||||
(__u32 __user *)arg);
|
||||
break;
|
||||
case LIRC_SET_REC_MODE:
|
||||
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)
|
||||
break;
|
||||
}
|
||||
|
||||
result = get_user(mode, (__u32 *)arg);
|
||||
result = get_user(mode, (__u32 __user *)arg);
|
||||
if (!result && !(LIRC_MODE2REC(mode) & ir->d.features))
|
||||
result = -EINVAL;
|
||||
/*
|
||||
@ -622,7 +622,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
*/
|
||||
break;
|
||||
case LIRC_GET_LENGTH:
|
||||
result = put_user(ir->d.code_length, (__u32 *)arg);
|
||||
result = put_user(ir->d.code_length, (__u32 __user *)arg);
|
||||
break;
|
||||
case LIRC_GET_MIN_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)
|
||||
break;
|
||||
}
|
||||
|
||||
result = put_user(ir->d.min_timeout, (__u32 *)arg);
|
||||
result = put_user(ir->d.min_timeout, (__u32 __user *)arg);
|
||||
break;
|
||||
case LIRC_GET_MAX_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)
|
||||
break;
|
||||
}
|
||||
|
||||
result = put_user(ir->d.max_timeout, (__u32 *)arg);
|
||||
result = put_user(ir->d.max_timeout, (__u32 __user *)arg);
|
||||
break;
|
||||
default:
|
||||
result = -EINVAL;
|
||||
@ -736,7 +736,7 @@ ssize_t lirc_dev_fop_read(struct file *file,
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
if (!ret)
|
||||
written += ir->buf->chunk_size;
|
||||
|
Loading…
Reference in New Issue
Block a user