From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754271AbdBVGmV (ORCPT ); Wed, 22 Feb 2017 01:42:21 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38935 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751349AbdBVGmN (ORCPT ); Wed, 22 Feb 2017 01:42:13 -0500 X-ME-Sender: X-Sasl-enc: /5oFo7t9suHEp1pKdJCpCIQuQT8QEozDFQHznfr9vpuB 1487745731 From: "Tobin C. Harding" To: Andrew Morton , Seth Forshee Cc: Alexey Dobriyan , "Eric W. Biederman" , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, "Tobin C. Harding" Subject: [PATCH] proc: Remove cast from memory allocation Date: Wed, 22 Feb 2017 17:42:00 +1100 Message-Id: <1487745720-16967-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 proc_inode *) is useless. Remove unnecessary cast. Signed-off-by: Tobin C. Harding --- fs/proc/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 842a5ff..1eb2326 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -57,7 +57,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb) struct proc_inode *ei; struct inode *inode; - ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); + ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); if (!ei) return NULL; ei->pid = NULL; -- 2.7.4