From: Julia Lawall <julia.lawall@lip6.fr>
To: "Tobin C. Harding" <me@tobin.cc>
Cc: Petr Vandrovec <petr@vandrovec.name>, Jan Kara <jack@suse.cz>,
Miklos Szeredi <mszeredi@redhat.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ncpfs: Remove cast from memory allocation
Date: Wed, 22 Feb 2017 22:08:44 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1702222207440.2041@hadrien> (raw)
In-Reply-To: <1487797394-30306-1-git-send-email-me@tobin.cc>
On Thu, 23 Feb 2017, Tobin C. Harding wrote:
> Coccinelle emits WARNING: casting value returned by memory allocation
> function to (struct ncp_inode_info *) is useless.
>
> Remove unnecessary cast.
>
> Changes since v1:
> - Fix up typo
Changes since v1 goes below the ---. When this ends up in the git
history, no one will care about the changes since v1, because v1 won't be
part of the history.
julia
>
> Signed-off-by: Tobin C. Harding <me@tobin.cc>
> ---
>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2017-02-22 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 21:03 Tobin C. Harding
2017-02-22 21:08 ` Julia Lawall [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=alpine.DEB.2.20.1702222207440.2041@hadrien \
--to=julia.lawall@lip6.fr \
--cc=jack@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@tobin.cc \
--cc=mszeredi@redhat.com \
--cc=petr@vandrovec.name \
/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®