IB/hfi1: Use context pointer rather than context index
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Mon, 24 Jul 2017 14:46:01 +0000 (07:46 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 31 Jul 2017 19:17:55 +0000 (15:17 -0400)
commit17573972f44d6293ed4fe561816b701241cb0847
tree26be8c4546962a50896a809678c646acf5ed2b54
parente6f7622df177d594f11d93343c3dda7637c761e0
IB/hfi1: Use context pointer rather than context index

The hfi1_<set|clear>_ctxt_<j|p>key functions take a context index and
look up the context based on that index.

Since the context index is being retrieved from the context, this
doesn't seem optimal.

Pass the context pointer for use, rather than the context index.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/chip.c
drivers/infiniband/hw/hfi1/chip.h
drivers/infiniband/hw/hfi1/file_ops.c