[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1596013140-49744-1-git-send-email-liheng40@huawei.com>
Date: Wed, 29 Jul 2020 16:59:00 +0800
From: Li Heng <liheng40@...wei.com>
To: <ericvh@...il.com>, <lucho@...kov.net>, <asmadeus@...ewreck.org>
CC: <v9fs-developer@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH -next] 9p: Remove unneeded cast from memory allocation
Remove casting the values returned by memory allocation function.
Coccinelle emits WARNING:
./fs/9p/vfs_inode.c:226:12-29: WARNING: casting value returned by memory allocation function to (struct v9fs_inode *) is useless.
Signed-off-by: Li Heng <liheng40@...wei.com>
---
fs/9p/vfs_inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 0fd5bf2..ae0c38a 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
--
2.7.4
Powered by blists - more mailing lists