All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/befs/linuxvfs.c: remove unnecessary casting
@ 2014-12-28 14:55 Fabian Frederick
  0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2014-12-28 14:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Andrew Morton

Fix the following coccinelle warning:

fs/befs/linuxvfs.c:278:14-36: WARNING: casting value returned by memory
allocation function to (struct befs_inode_info *) is useless.

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/befs/linuxvfs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index edf4777..2255f4a 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -274,9 +274,8 @@ more:
 static struct inode *
 befs_alloc_inode(struct super_block *sb)
 {
-        struct befs_inode_info *bi;
-        bi = (struct befs_inode_info *)kmem_cache_alloc(befs_inode_cachep,
-							GFP_KERNEL);
+	struct befs_inode_info *bi = kmem_cache_alloc(befs_inode_cachep,
+						      GFP_KERNEL);
         if (!bi)
                 return NULL;
         return &bi->vfs_inode;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-28 14:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 14:55 [PATCH 1/1] fs/befs/linuxvfs.c: remove unnecessary casting Fabian Frederick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.