IB/hfi1: Fix AHG KDETH Intr shift
authorJubin John <jubin.john@intel.com>
Wed, 31 Aug 2016 14:24:27 +0000 (07:24 -0700)
committerDoug Ledford <dledford@redhat.com>
Fri, 2 Sep 2016 18:26:55 +0000 (14:26 -0400)
commitaf53493916693343955930556aaa83f875b8436a
tree80171cbc25a88cad30ca48c3d9cfb371e2628e56
parent3e6c3b0fd5d071ed17bf91586aae35a6cfb8cdb3
IB/hfi1: Fix AHG KDETH Intr shift

In the set_txreq_header_ahg(), The KDETH Intr bit is obtained from the
header in the user sdma request using a KDETH_GET shift and mask macro.
This value is then futher right shifted by 16 causing us to lose the
value i.e it is shifted to zero, leading to the following
smatch warning:
drivers/infiniband/hw/hfi1/user_sdma.c:1482 set_txreq_header_ahg()
warn: mask and shift to zero

The Intr bit should be left shifted into its correct position in the
KDETH header before the AHG update.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/user_sdma.c