diff options
author | Shraddha Barke | 2015-10-14 21:28:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-10-17 07:51:48 +0200 |
commit | a787bde8ce7f3c6c5ba50175769827fbde3b42c0 (patch) | |
tree | 5735a850a39a7370ea8f86004cacee8d785d9b4d /drivers/staging/rdma/hfi1/mad.c | |
parent | Staging: media: Remove unnecessary cast on void pointer (diff) | |
download | kernel-qcow2-linux-a787bde8ce7f3c6c5ba50175769827fbde3b42c0.tar.gz kernel-qcow2-linux-a787bde8ce7f3c6c5ba50175769827fbde3b42c0.tar.xz kernel-qcow2-linux-a787bde8ce7f3c6c5ba50175769827fbde3b42c0.zip |
Staging: rdma: hfi1: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types.
The semantic patch used to find this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/mad.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/mad.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c index b2c1b72d38ce..58723fb6b8bd 100644 --- a/drivers/staging/rdma/hfi1/mad.c +++ b/drivers/staging/rdma/hfi1/mad.c @@ -1438,7 +1438,7 @@ static int __subn_set_opa_pkeytable(struct opa_smp *smp, u32 am, u8 *data, static int get_sc2vlt_tables(struct hfi1_devdata *dd, void *data) { - u64 *val = (u64 *)data; + u64 *val = data; *val++ = read_csr(dd, SEND_SC2VLT0); *val++ = read_csr(dd, SEND_SC2VLT1); @@ -1457,7 +1457,7 @@ static int get_sc2vlt_tables(struct hfi1_devdata *dd, void *data) static void filter_sc2vlt(void *data) { int i; - u8 *pd = (u8 *)data; + u8 *pd = data; for (i = 0; i < OPA_MAX_SCS; i++) { if (i == 15) @@ -1469,7 +1469,7 @@ static void filter_sc2vlt(void *data) static int set_sc2vlt_tables(struct hfi1_devdata *dd, void *data) { - u64 *val = (u64 *)data; + u64 *val = data; filter_sc2vlt(data); @@ -1478,7 +1478,7 @@ static int set_sc2vlt_tables(struct hfi1_devdata *dd, void *data) write_csr(dd, SEND_SC2VLT2, *val++); write_csr(dd, SEND_SC2VLT3, *val++); write_seqlock_irq(&dd->sc2vl_lock); - memcpy(dd->sc2vl, (u64 *)data, sizeof(dd->sc2vl)); + memcpy(dd->sc2vl, data, sizeof(dd->sc2vl)); write_sequnlock_irq(&dd->sc2vl_lock); return 0; } |