diff options
author | Brian Welty <brian.welty@intel.com> | 2016-06-09 16:51:20 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-06-18 02:11:26 +0200 |
commit | 501edc42446e89fa67fb6ef2c9afb50792c310c0 (patch) | |
tree | a498c705dab0aec6ff987f9f9e5cd13523ced27e /drivers/infiniband | |
parent | IB/rdmavt: Correct required callback functions for MODIFY_QP (diff) | |
download | linux-501edc42446e89fa67fb6ef2c9afb50792c310c0.tar.xz linux-501edc42446e89fa67fb6ef2c9afb50792c310c0.zip |
IB/rdmavt: Correct warning during QPN allocation
Correct calculation of the low order bits which should be unset
based on use of qos_shift parameter when assigning QPN.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Brian Welty <brian.welty@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/qp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index 7de5134bec85..c3e0d614f68b 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -369,8 +369,8 @@ static int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, /* wrap to first map page, invert bit 0 */ offset = qpt->incr | ((offset & 1) ^ 1); } - /* there can be no bits at shift and below */ - WARN_ON(offset & (rdi->dparms.qos_shift - 1)); + /* there can be no set bits in low-order QoS bits */ + WARN_ON(offset & (BIT(rdi->dparms.qos_shift) - 1)); qpn = mk_qpn(qpt, map, offset); } |