summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorLi Heng <liheng40@huawei.com>2020-07-29 16:59:00 +0800
committerDominique Martinet <asmadeus@codewreck.org>2020-07-31 07:28:25 +0200
commit2ed0b7578170c3bab10cde09d4440897b305e40c (patch)
tree47d5167f3c224c1c7e34ba8731e0c7c8ce9861dc /fs/9p
parentaab6c873cf9b7afa9ca1ad82e48734178080f534 (diff)
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.com Signed-off-by: Li Heng <liheng40@huawei.com> [Dominique: commit message wording] Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 0fd5bf29880e..ae0c38ad1fcb 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -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