Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1585947 > unrolled thread

[PATCH] ncpfs: Remove cast from memory allocation

Started by"Tobin C. Harding" <me@tobin.cc>
First post2017-02-22 07:40 +0100
Last post2017-02-22 07:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ncpfs: Remove cast from memory allocation "Tobin C. Harding" <me@tobin.cc> - 2017-02-22 07:40 +0100

#1585947 — [PATCH] ncpfs: Remove cast from memory allocation

From"Tobin C. Harding" <me@tobin.cc>
Date2017-02-22 07:40 +0100
Subject[PATCH] ncpfs: Remove cast from memory allocation
Message-ID<tdyKK-5Ut-5@gated-at.bofh.it>
Coccinelle emits WARNING: casting value returned by memory allocation
function to (struct ncp_inode_info *) is useless.

Remove unnecessary cast.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 fs/ncpfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 7eb89c2..a1b8e7a 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -52,7 +52,7 @@ static struct kmem_cache * ncp_inode_cachep;
 static struct inode *ncp_alloc_inode(struct super_block *sb)
 {
 	struct ncp_inode_info *ei;
-	ei = (struct ncp_inode_info *)kmem_cache_alloc(ncp_inode_cachep, GFP_KERNEL);
+	ei = lkmem_cache_alloc(ncp_inode_cachep, GFP_KERNEL);
 	if (!ei)
 		return NULL;
 	return &ei->vfs_inode;
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web