From patchwork Wed Feb 22 06:34:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobin Harding X-Patchwork-Id: 9586247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 62BD3602A7 for ; Wed, 22 Feb 2017 06:51:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A34228684 for ; Wed, 22 Feb 2017 06:51:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D9FC28692; Wed, 22 Feb 2017 06:51:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1ABDC28684 for ; Wed, 22 Feb 2017 06:51:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cgQm1-00039C-6T; Wed, 22 Feb 2017 06:51:37 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cgQm0-000391-5P for v9fs-developer@lists.sourceforge.net; Wed, 22 Feb 2017 06:51:36 +0000 X-ACL-Warn: Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1cgQly-00024C-64 for v9fs-developer@lists.sourceforge.net; Wed, 22 Feb 2017 06:51:36 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 543ED209A9; Wed, 22 Feb 2017 01:34:22 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 22 Feb 2017 01:34:22 -0500 X-ME-Sender: X-Sasl-enc: ufeUeF2CO9uESwTpX5u2kclsa6R3r4b+wtQlUBvdxYh0 1487745261 Received: from eros.fritz.box (124-169-107-61.dyn.iinet.net.au [124.169.107.61]) by mail.messagingengine.com (Postfix) with ESMTPA id EFA6F24216; Wed, 22 Feb 2017 01:34:19 -0500 (EST) From: "Tobin C. Harding" To: Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov Date: Wed, 22 Feb 2017 17:34:13 +1100 Message-Id: <1487745253-15411-1-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 X-Headers-End: 1cgQly-00024C-64 Cc: v9fs-developer@lists.sourceforge.net, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, "Tobin C. Harding" Subject: [V9fs-developer] [PATCH] fs/9p: Remove cast from memory allocation X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP Coccinelle emits WARNING: casting value returned by memory allocation function to (struct v9fs_inode *) is useless. Remove unnecessary cast. Signed-off-by: Tobin C. Harding --- fs/9p/vfs_inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index f4f4450..462e9e4 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -238,8 +238,7 @@ v9fs_blank_wstat(struct p9_wstat *wstat) struct inode *v9fs_alloc_inode(struct super_block *sb) { struct v9fs_inode *v9inode; - v9inode = (struct v9fs_inode *)kmem_cache_alloc(v9fs_inode_cache, - GFP_KERNEL); + v9inode = kmem_cache_alloc(v9fs_inode_cache, GFP_KERNEL); if (!v9inode) return NULL; #ifdef CONFIG_9P_FSCACHE