[POC][PATCH 14/83] proc_dev_atm_read(): get rid of pointless casts
From: Al Viro
Date: Mon Dec 21 2015 - 19:11:28 EST
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/