public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/ufs/super.c: remove unnecessary casting
@ 2014-12-28 15:28 Fabian Frederick
  2014-12-28 15:33 ` Al Viro
  2014-12-28 16:54 ` Joe Perches
  0 siblings, 2 replies; 6+ messages in thread
From: Fabian Frederick @ 2014-12-28 15:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Evgeniy Dushistov, Andrew Morton

Fix the following coccinelle warning:
fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
allocation function to (struct ufs_inode_info *) is useless.

Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/ufs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index da73801..a15798f 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1414,8 +1414,8 @@ static struct kmem_cache * ufs_inode_cachep;
 
 static struct inode *ufs_alloc_inode(struct super_block *sb)
 {
-	struct ufs_inode_info *ei;
-	ei = (struct ufs_inode_info *)kmem_cache_alloc(ufs_inode_cachep, GFP_NOFS);
+	struct ufs_inode_info *ei = kmem_cache_alloc(ufs_inode_cachep,
+						     GFP_NOFS);
 	if (!ei)
 		return NULL;
 	ei->vfs_inode.i_version = 1;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-31  8:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-28 15:28 [PATCH 1/1] fs/ufs/super.c: remove unnecessary casting Fabian Frederick
2014-12-28 15:33 ` Al Viro
2014-12-28 16:45   ` Joe Perches
2014-12-28 18:21     ` Al Viro
2014-12-31  8:46       ` Fabian Frederick
2014-12-28 16:54 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox