浏览代码

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: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran 9 年之前
父节点
当前提交
16ccad0475
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/rdma/hfi1/user_sdma.c

+ 1 - 1
drivers/staging/rdma/hfi1/user_sdma.c

@@ -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));
 }