lkml.org 
[lkml]   [2015]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[POC][PATCH 14/83] proc_dev_atm_read(): get rid of pointless casts
Date
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


\
 
 \ /
  Last update: 2015-12-22 01:21    [W:0.577 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site