Sparse complains because there are no __user annotations. drivers/media/rc/lirc_dev.c:156:27: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) drivers/media/rc/lirc_dev.c:156:27: expected int ( *read )( ... ) drivers/media/rc/lirc_dev.c:156:27: got int ( extern [toplevel] *<noident> )( ... )
Showing the changes to include/media/lirc_dev.h (1 of 2 files). Show all
Unified · Split
| @@ -217,9 +217,9 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file); · 216 unmodified lines | ||
| 217 | 217 | int lirc_dev_fop_close(struct inode *inode, struct file *file); |
| 218 | 218 | unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait); |
| 219 | 219 | long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 220 | −ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length, | |
| 220 | +ssize_t lirc_dev_fop_read(struct file *file, char __user *buffer, size_t length, | |
| 221 | 221 | loff_t *ppos); |
| 222 | −ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length, | |
| 223 | − loff_t *ppos); | |
| 222 | +ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer, | |
| 223 | + size_t length, loff_t *ppos); | |
| 224 | 224 | |
| 225 | 225 | #endif |