From b4b7ff4b08e691656c9d77c758fc355833128ac0 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 20 Jan 2016 14:01:31 -0300 Subject: Linux-libre 4.4-gnu --- drivers/staging/rdma/hfi1/mad.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/staging/rdma/hfi1/mad.c') diff --git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c index b2c1b72d3..32f703736 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; } @@ -1488,7 +1488,7 @@ static int __subn_get_opa_sl_to_sc(struct opa_smp *smp, u32 am, u8 *data, u32 *resp_len) { struct hfi1_ibport *ibp = to_iport(ibdev, port); - u8 *p = (u8 *)data; + u8 *p = data; size_t size = ARRAY_SIZE(ibp->sl_to_sc); /* == 32 */ unsigned i; @@ -1511,7 +1511,7 @@ static int __subn_set_opa_sl_to_sc(struct opa_smp *smp, u32 am, u8 *data, u32 *resp_len) { struct hfi1_ibport *ibp = to_iport(ibdev, port); - u8 *p = (u8 *)data; + u8 *p = data; int i; if (am) { @@ -1530,7 +1530,7 @@ static int __subn_get_opa_sc_to_sl(struct opa_smp *smp, u32 am, u8 *data, u32 *resp_len) { struct hfi1_ibport *ibp = to_iport(ibdev, port); - u8 *p = (u8 *)data; + u8 *p = data; size_t size = ARRAY_SIZE(ibp->sc_to_sl); /* == 32 */ unsigned i; @@ -1553,7 +1553,7 @@ static int __subn_set_opa_sc_to_sl(struct opa_smp *smp, u32 am, u8 *data, u32 *resp_len) { struct hfi1_ibport *ibp = to_iport(ibdev, port); - u8 *p = (u8 *)data; + u8 *p = data; int i; if (am) { @@ -3257,7 +3257,7 @@ static int __subn_get_opa_hfi1_cong_log(struct opa_smp *smp, u32 am, return reply((struct ib_mad_hdr *)smp); } - spin_lock(&ppd->cc_log_lock); + spin_lock_irq(&ppd->cc_log_lock); cong_log->log_type = OPA_CC_LOG_TYPE_HFI; cong_log->congestion_flags = 0; @@ -3300,7 +3300,7 @@ static int __subn_get_opa_hfi1_cong_log(struct opa_smp *smp, u32 am, sizeof(ppd->threshold_cong_event_map)); ppd->threshold_event_counter = 0; - spin_unlock(&ppd->cc_log_lock); + spin_unlock_irq(&ppd->cc_log_lock); if (resp_len) *resp_len += sizeof(struct opa_hfi1_cong_log); -- cgit v1.2.3-54-g00ecf