From: Hannes Eder Date: Sat, 13 Dec 2008 05:19:18 +0000 (-0800) Subject: mISDN: timerdev: use __user for mISDN_read's buffer argument X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c46f0a2d40f7ceb5fb696309bcd088ac75d0fe20;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mISDN: timerdev: use __user for mISDN_read's buffer argument Fix this warning: drivers/isdn/mISDN/timerdev.c:264:11: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) drivers/isdn/mISDN/timerdev.c:264:11: expected int ( *read )( ... ) drivers/isdn/mISDN/timerdev.c:264:11: got int ( static [toplevel] * )( ... ) Signed-off-by: Hannes Eder Acked-by: Karsten Keil Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 62b5e49684e5..f2b32186d4a1 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c @@ -86,7 +86,7 @@ mISDN_close(struct inode *ino, struct file *filep) } static ssize_t -mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off) +mISDN_read(struct file *filep, char __user *buf, size_t count, loff_t *off) { struct mISDNtimerdev *dev = filep->private_data; struct mISDNtimer *timer; @@ -116,7 +116,7 @@ mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off) timer = (struct mISDNtimer *)dev->expired.next; list_del(&timer->list); spin_unlock_irqrestore(&dev->lock, flags); - if (put_user(timer->id, (int *)buf)) + if (put_user(timer->id, (int __user *)buf)) ret = -EFAULT; else ret = sizeof(int);