提交 adcda652 编写于 作者: H Himangi Saraogi 提交者: Trond Myklebust

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: NHimangi Saraogi <himangi774@gmail.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 57b696fb
...@@ -195,7 +195,7 @@ static struct inode * ...@@ -195,7 +195,7 @@ static struct inode *
rpc_alloc_inode(struct super_block *sb) rpc_alloc_inode(struct super_block *sb)
{ {
struct rpc_inode *rpci; struct rpc_inode *rpci;
rpci = (struct rpc_inode *)kmem_cache_alloc(rpc_inode_cachep, GFP_KERNEL); rpci = kmem_cache_alloc(rpc_inode_cachep, GFP_KERNEL);
if (!rpci) if (!rpci)
return NULL; return NULL;
return &rpci->vfs_inode; return &rpci->vfs_inode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册