Skip to content

Commit adcda65

Browse files
himangi774trondmypd
authored andcommitted
rpc_pipe: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent 57b696f commit adcda65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/sunrpc/rpc_pipe.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static struct inode *
195195
rpc_alloc_inode(struct super_block *sb)
196196
{
197197
struct rpc_inode *rpci;
198-
rpci = (struct rpc_inode *)kmem_cache_alloc(rpc_inode_cachep, GFP_KERNEL);
198+
rpci = kmem_cache_alloc(rpc_inode_cachep, GFP_KERNEL);
199199
if (!rpci)
200200
return NULL;
201201
return &rpci->vfs_inode;

0 commit comments

Comments
 (0)