summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes
diff options
context:
space:
mode:
authorLeon Romanovsky <leon@kernel.org>2017-04-22 17:28:52 +0300
committerDoug Ledford <dledford@redhat.com>2017-04-28 13:11:43 -0400
commit1e0729348fdc1f0ecb1838a66da5592f6a6647f2 (patch)
tree49aed0e9466f1c677f1cac2f65d6d276e99562a4 /drivers/infiniband/hw/nes
parent313e16d5afaf000bd3f7a80e328890f963a10366 (diff)
IB/nes: Fix incorrect type in assignment
Fix mismatch between types, wqe_words are in le32 format, while opcode in CPU format. The following sparse warnings are helped to find it: drivers/infiniband/hw/nes/nes_hw.c:3058:24: warning: incorrect type in assignment (different base types) drivers/infiniband/hw/nes/nes_hw.c:3058:24: expected unsigned int [unsigned] [assigned] [usertype] opcode drivers/infiniband/hw/nes/nes_hw.c:3058:24: got restricted __le32 <noident> CC: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 19acd13c6cb1..4bbff7a33d18 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -3055,7 +3055,7 @@ static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq)
memcpy(cqp_wqe, &cqp_request->cqp_wqe, sizeof(*cqp_wqe));
barrier();
- opcode = cqp_wqe->wqe_words[NES_CQP_WQE_OPCODE_IDX];
+ opcode = le32_to_cpu(cqp_wqe->wqe_words[NES_CQP_WQE_OPCODE_IDX]);
if ((opcode & NES_CQP_OPCODE_MASK) == NES_CQP_DOWNLOAD_SEGMENT)
ctx_index = NES_CQP_WQE_DL_COMP_CTX_LOW_IDX;
else