提交 16ccad04 编写于 作者: J Janani Ravichandran 提交者: Greg Kroah-Hartman

staging: rdma: hfi1: user_sdma.c: Drop void pointer cast

Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void *e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)
Signed-off-by: NJanani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 acc17d67
......@@ -345,7 +345,7 @@ static void activate_packet_queue(struct iowait *wait, int reason)
static void sdma_kmem_cache_ctor(void *obj)
{
struct user_sdma_txreq *tx = (struct user_sdma_txreq *)obj;
struct user_sdma_txreq *tx = obj;
memset(tx, 0, sizeof(*tx));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册