From: Thomas Meyer <thomas@m3y3r.de>
To: ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] fs: Cocci spatch "alloc_cast"
Date: Thu, 21 Sep 2017 08:33:46 +0200 [thread overview]
Message-ID: <1505975570447-1618419052-2-diffsplit-thomas@m3y3r.de> (raw)
In-Reply-To: <1505975570447-826702259-0-diffsplit-thomas@m3y3r.de>
Remove casting the values returned by memory allocation functions like
kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc."
Found by coccinelle spatch "api/alloc/alloc_cast.cocci"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -238,7 +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,
+ v9inode = kmem_cache_alloc(v9fs_inode_cache,
GFP_KERNEL);
if (!v9inode)
return NULL;
next prev parent reply other threads:[~2017-09-21 6:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 6:33 [PATCH 0/4] Cocci spatch "alloc_cast" - v4.14-rc1 Thomas Meyer
2017-09-21 6:33 ` [PATCH 4/4] ALSA: emu10k1: Cocci spatch "alloc_cast" Thomas Meyer
2017-09-21 8:00 ` Takashi Iwai
2017-09-21 17:39 ` Al Viro
2017-09-21 20:39 ` Takashi Iwai
2017-09-21 6:33 ` Thomas Meyer [this message]
2017-09-21 6:33 ` [PATCH 1/4] drm/amd/powerplay: " Thomas Meyer
2017-09-21 6:55 ` Deucher, Alexander
2017-09-26 16:10 ` Alex Deucher
2017-09-21 6:33 ` [PATCH 3/4] VFS: normal filesystems (and lustre): " Thomas Meyer
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=1505975570447-1618419052-2-diffsplit-thomas@m3y3r.de \
--to=thomas@m3y3r.de \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--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®