Commit 2ed0b757 authored by Li Heng's avatar Li Heng Committed by Dominique Martinet

9p: Remove unneeded cast from memory allocation

Remove kmem_cache_alloc return value cast.

Coccinelle emits the following warning:

./fs/9p/vfs_inode.c:226:12-29: WARNING: casting value returned by memory allocation function to (struct v9fs_inode *) is useless.

Link: http://lkml.kernel.org/r/1596013140-49744-1-git-send-email-liheng40@huawei.comSigned-off-by: default avatarLi Heng <liheng40@huawei.com>
[Dominique: commit message wording]
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent aab6c873
......@@ -223,8 +223,7 @@ v9fs_blank_wstat(struct p9_wstat *wstat)
struct inode *v9fs_alloc_inode(struct super_block *sb)
{
struct v9fs_inode *v9inode;
v9inode = (struct v9fs_inode *)kmem_cache_alloc(v9fs_inode_cache,
GFP_KERNEL);
v9inode = kmem_cache_alloc(v9fs_inode_cache, GFP_KERNEL);
if (!v9inode)
return NULL;
#ifdef CONFIG_9P_FSCACHE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment