fs/befs/linuxvfs.c: remove unnecessary casting
authorFabian Frederick <fabf@skynet.be>
Tue, 17 Feb 2015 21:45:23 +0000 (13:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 17 Feb 2015 22:34:50 +0000 (14:34 -0800)
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.

[akpm@linux-foundation.org: avoid 80-col ugliness]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/befs/linuxvfs.c

index edf47774b03d56f7ab0671a4b6d57b7f4193a550..e089f1985fcaa35e4e213669776e0f3190fc0db8 100644 (file)
@@ -274,9 +274,9 @@ 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;
+
+       bi = kmem_cache_alloc(befs_inode_cachep, GFP_KERNEL);
         if (!bi)
                 return NULL;
         return &bi->vfs_inode;