From: Greg Kurz <groug@kaod.org>
To: "Tobin C. Harding" <me@tobin.cc>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
Ron Minnich <rminnich@sandia.gov>,
Latchesar Ionkov <lucho@ionkov.net>,
v9fs-developer@lists.sourceforge.net,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [V9fs-developer] [PATCH] fs/9p: Remove cast from memory allocation
Date: Wed, 22 Feb 2017 09:08:21 +0100 [thread overview]
Message-ID: <20170222090821.4b6f32b0@bahia.lan> (raw)
In-Reply-To: <1487745253-15411-1-git-send-email-me@tobin.cc>
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
On Wed, 22 Feb 2017 17:34:13 +1100
"Tobin C. Harding" <me@tobin.cc> wrote:
> 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 <me@tobin.cc>
> ---
Reviewed-by: Greg Kurz <groug@kaod.org>
> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2017-02-22 9:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 6:34 Tobin C. Harding
2017-02-22 8:08 ` Greg Kurz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170222090821.4b6f32b0@bahia.lan \
--to=groug@kaod.org \
--cc=ericvh@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=me@tobin.cc \
--cc=rminnich@sandia.gov \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®