Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1296388 > unrolled thread

[POC][PATCH 09/83] configfs_follow_link(): get rid of pointless casts

Started byAl Viro <viro@ZenIV.linux.org.uk>
First post2015-12-22 01:20 +0100
Last post2015-12-22 01:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [POC][PATCH 09/83] configfs_follow_link(): get rid of pointless casts Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-22 01:20 +0100

#1296388 — [POC][PATCH 09/83] configfs_follow_link(): get rid of pointless casts

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2015-12-22 01:20 +0100
Subject[POC][PATCH 09/83] configfs_follow_link(): get rid of pointless casts
Message-ID<qIiQh-548-3@gated-at.bofh.it>
From: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/configfs/symlink.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index f8f4d9a..ae41e92 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.c
@@ -281,18 +281,18 @@ static int configfs_getlink(struct dentry *dentry, char * path)
 
 static const char *configfs_follow_link(struct dentry *dentry, void **cookie)
 {
-	unsigned long page = (unsigned long)get_zeroed_page(GFP_KERNEL);
+	void *page = get_zeroed_page(GFP_KERNEL);
 	int error;
 
 	if (!page)
 		return ERR_PTR(-ENOMEM);
 
-	error = configfs_getlink(dentry, (char *)page);
+	error = configfs_getlink(dentry, page);
 	if (!error) {
-		return *cookie = (void *)page;
+		return *cookie = page;
 	}
 
-	free_page((void *)page);
+	free_page(page);
 	return ERR_PTR(error);
 }
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web