diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2012-07-16 17:11:06 +0000 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-07-17 10:18:37 -0700 |
commit | 1fb9fed6d48960fec3ad8c97fed9aa16c9557091 (patch) | |
tree | 1ad8f9170aa4940aba1a3ba7d7d471a918a88420 /drivers/infiniband/hw/qib/qib_mad.c | |
parent | 7e23017704172cb6508cb365eb2cae7335e5da71 (diff) | |
download | talos-op-linux-1fb9fed6d48960fec3ad8c97fed9aa16c9557091.tar.gz talos-op-linux-1fb9fed6d48960fec3ad8c97fed9aa16c9557091.zip |
IB/qib: Fix QP RCU sparse warnings
Commit af061a644a0e ("IB/qib: Use RCU for qpn lookup") introduced sparse
warnings.
This patch corrects those issues.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_mad.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_mad.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c index 43390217a026..6e20b58b90b6 100644 --- a/drivers/infiniband/hw/qib/qib_mad.c +++ b/drivers/infiniband/hw/qib/qib_mad.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2006, 2007, 2008, 2009, 2010 QLogic Corporation. - * All rights reserved. + * Copyright (c) 2012 Intel Corporation. All rights reserved. + * Copyright (c) 2006 - 2012 QLogic Corporation. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -90,14 +90,10 @@ static void qib_send_trap(struct qib_ibport *ibp, void *data, unsigned len) if (!ibp->sm_ah) { if (ibp->sm_lid != be16_to_cpu(IB_LID_PERMISSIVE)) { struct ib_ah *ah; - struct ib_ah_attr attr; - memset(&attr, 0, sizeof attr); - attr.dlid = ibp->sm_lid; - attr.port_num = ppd_from_ibp(ibp)->port; - ah = ib_create_ah(ibp->qp0->ibqp.pd, &attr); + ah = qib_create_qp0_ah(ibp, ibp->sm_lid); if (IS_ERR(ah)) - ret = -EINVAL; + ret = PTR_ERR(ah); else { send_buf->ah = ah; ibp->sm_ah = to_iah(ah); |