projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acc17d6
)
staging: rdma: hfi1: user_sdma.c: Drop void pointer cast
author
Janani Ravichandran
<
[email protected]
>
Thu, 25 Feb 2016 20:08:17 +0000
(15:08 -0500)
committer
Greg Kroah-Hartman
<
[email protected]
>
Sat, 12 Mar 2016 06:09:09 +0000
(22:09 -0800)
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 <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/rdma/hfi1/user_sdma.c
patch
|
blob
|
history
diff --git
a/drivers/staging/rdma/hfi1/user_sdma.c
b/drivers/staging/rdma/hfi1/user_sdma.c
index 2f484195479c8c6dd2b39b7a1f33cc2faf9d527b..d152126a15be34d0f31aacc11b3b701529959375 100644
(file)
--- a/
drivers/staging/rdma/hfi1/user_sdma.c
+++ b/
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));
}