From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755194AbdBVWDK (ORCPT ); Wed, 22 Feb 2017 17:03:10 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:48534 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754423AbdBVWDA (ORCPT ); Wed, 22 Feb 2017 17:03:00 -0500 X-ME-Sender: X-Sasl-enc: RBomY9j6HwTToIYUIaQCqEywESi3FgrsnmR3CTSmfOYH 1487800978 From: "Tobin C. Harding" To: Petr Vandrovec Cc: "Tobin C. Harding" , Jan Kara , Miklos Szeredi , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] ncpfs: Remove cast from memory allocation Date: Thu, 23 Feb 2017 09:02:50 +1100 Message-Id: <1487800970-4887-1-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes since v2: - Put version amendment comments in correct place within patch email. Changes since v1: - Fix up typo Kernel built successfully with patch applied. 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..7a9ed33 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 = kmem_cache_alloc(ncp_inode_cachep, GFP_KERNEL); if (!ei) return NULL; return &ei->vfs_inode; -- 2.7.4