Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp954674ybg; Wed, 29 Jul 2020 01:58:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyE3SqNuv0Lu2h6EbFPY+r3hHFfQ4OGnlhXAtXvmfGVW/kk9iDalJbbfBNvJRswA2AoRIo X-Received: by 2002:a17:906:b0d3:: with SMTP id bk19mr30821199ejb.167.1596013128793; Wed, 29 Jul 2020 01:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596013128; cv=none; d=google.com; s=arc-20160816; b=igDNyaU86yPdQST0axd76cilzYLWZ/vsCM74bf5AkXMe7m4ldxWnO1c5JejYSpbXtl fuIbjmnKrSqnDi4k2QKZAi7Juk4Zo1QHsVa/w+DOEdVudEZhjjb74zlnFCFzWfS9I/kq 18XxCwj7MWzzkoBcAzhbB1lsVpOwb/gA27Cd21dUXWLyPjuyJDQu8qFe5yh/f+RSm00w qbM7Ai3ePml7WlYYl3q8Dl6Bw+BWuEvu14gvz4CHDIrA1xIf/4MCRn3eFJmSJ2B9+JjI Td24mVunydesS3znYnGEPNzDTP+KrvYXW9oRGBi/yq3FsBUNeUogizGT832hWprLRSMG hcZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=/Tz85MgWOGQqDHYQqJ8tJqGYvVithjlpy2NNPgKkBu0=; b=Q/z9j0e6f/6YpzwX+vNgov1A1LMa9uhaR41ls2NCGW6L4pa3yp7lLme47qG0oj6xDw zAfXrdeYpl2EkfabZrMZG0fVEssZZfKCav5TYr9leLP29w+4CyuDeFXuedeQS2h2Hq1N +DJWdUzJA52sAkLh4OHWfP1HfuUOXVayMtX7QE+l8cAlrTAfVZsVVpAE0mLGabEKJarV dxWqmvyH1BxzeJU+pDYJs9QlERUIyk6hLqTbK6Um5WNEFkQYGmkb8/qEbFRjZ7TLb0bj pKtOLbOwOzWPa7TaIssIUpi3soa0gOdRRO4e9shm/wSK7LUMf9UQXAMliF67SgStOFn1 4pQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de16si787265edb.27.2020.07.29.01.58.27; Wed, 29 Jul 2020 01:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727844AbgG2I5l (ORCPT + 99 others); Wed, 29 Jul 2020 04:57:41 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35510 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726476AbgG2I5l (ORCPT ); Wed, 29 Jul 2020 04:57:41 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DEB747C83FEAD6812F18; Wed, 29 Jul 2020 16:57:37 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Wed, 29 Jul 2020 16:57:36 +0800 From: Li Heng To: , , CC: , Subject: [PATCH -next] 9p: Remove unneeded cast from memory allocation Date: Wed, 29 Jul 2020 16:59:00 +0800 Message-ID: <1596013140-49744-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./fs/9p/vfs_inode.c:226:12-29: WARNING: casting value returned by memory allocation function to (struct v9fs_inode *) is useless. Signed-off-by: Li Heng --- 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 0fd5bf2..ae0c38a 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -223,8 +223,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 -- 2.7.4