summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-05-09 00:54:55 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-09 02:15:10 +0200
commitf245e1c17a702964ad552878d01a10e53cf0e8e5 (patch)
treec4420520fe12f42c1d082212aafa7fd7168f895d /fs/proc
parentmm, compaction: finish whole pageblock to reduce fragmentation (diff)
downloadlinux-f245e1c17a702964ad552878d01a10e53cf0e8e5.tar.xz
linux-f245e1c17a702964ad552878d01a10e53cf0e8e5.zip
fs/proc/inode.c: remove cast from memory allocation
Coccinelle emits this warning: WARNING: casting value returned by memory allocation function to (struct proc_inode *) is useless. Remove unnecessary cast. Link: http://lkml.kernel.org/r/1487745720-16967-1-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 2cc7a8030275..e250910cffc8 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -58,7 +58,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb)
struct proc_inode *ei;
struct inode *inode;
- ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL);
+ ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL);
if (!ei)
return NULL;
ei->pid = NULL;