| From | Al Viro <> | Subject | [POC][PATCH 14/83] proc_dev_atm_read(): get rid of pointless casts | Date | Mon, 21 Dec 2015 23:46:47 +0000 |
| |
From: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> --- net/atm/proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/atm/proc.c b/net/atm/proc.c index cf8993a..d04e11f 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c @@ -377,28 +377,28 @@ static ssize_t proc_dev_atm_read(struct file *file, char __user *buf, size_t count, loff_t *pos) { struct atm_dev *dev; - unsigned long page; + char *page; int length; if (count == 0) return 0; - page = (unsigned long)get_zeroed_page(GFP_KERNEL); + page = get_zeroed_page(GFP_KERNEL); if (!page) return -ENOMEM; dev = PDE_DATA(file_inode(file)); if (!dev->ops->proc_read) length = -EINVAL; else { - length = dev->ops->proc_read(dev, pos, (char *)page); + length = dev->ops->proc_read(dev, pos, page); if (length > count) length = -EINVAL; } if (length >= 0) { - if (copy_to_user(buf, (char *)page, length)) + if (copy_to_user(buf, page, length)) length = -EFAULT; (*pos)++; } - free_page((void *)page); + free_page(page); return length; } -- 2.1.4
|