Date: Wed, 14 Jun 2017 16:55:23 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319952 - head/sys/ofed/drivers/infiniband/core Message-ID: <201706141655.v5EGtNxr079773@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Jun 14 16:55:23 2017 New Revision: 319952 URL: https://svnweb.freebsd.org/changeset/base/319952 Log: Fix indentation. MFC after: 1 week Modified: head/sys/ofed/drivers/infiniband/core/mad.c Modified: head/sys/ofed/drivers/infiniband/core/mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/mad.c Wed Jun 14 16:46:49 2017 (r319951) +++ head/sys/ofed/drivers/infiniband/core/mad.c Wed Jun 14 16:55:23 2017 (r319952) @@ -1702,28 +1702,28 @@ int ib_post_send_mad(struct ib_mad_send_buf *send_buf, if (ret < 0) goto error; } else { - /* Reference MAD agent until send completes */ - atomic_inc(&mad_agent_priv->refcount); - spin_lock_irqsave(&mad_agent_priv->lock, flags); - list_add_tail(&mad_send_wr->agent_list, - &mad_agent_priv->send_list); - spin_unlock_irqrestore(&mad_agent_priv->lock, flags); - - if (mad_agent_priv->agent.rmpp_version) { - ret = ib_send_rmpp_mad(mad_send_wr); - if (ret >= 0 && ret != IB_RMPP_RESULT_CONSUMED) - ret = ib_send_mad(mad_send_wr); - } else - ret = ib_send_mad(mad_send_wr); - if (ret < 0) { - /* Fail send request */ + /* Reference MAD agent until send completes */ + atomic_inc(&mad_agent_priv->refcount); spin_lock_irqsave(&mad_agent_priv->lock, flags); - list_del(&mad_send_wr->agent_list); + list_add_tail(&mad_send_wr->agent_list, + &mad_agent_priv->send_list); spin_unlock_irqrestore(&mad_agent_priv->lock, flags); - atomic_dec(&mad_agent_priv->refcount); - goto error; + + if (mad_agent_priv->agent.rmpp_version) { + ret = ib_send_rmpp_mad(mad_send_wr); + if (ret >= 0 && ret != IB_RMPP_RESULT_CONSUMED) + ret = ib_send_mad(mad_send_wr); + } else + ret = ib_send_mad(mad_send_wr); + if (ret < 0) { + /* Fail send request */ + spin_lock_irqsave(&mad_agent_priv->lock, flags); + list_del(&mad_send_wr->agent_list); + spin_unlock_irqrestore(&mad_agent_priv->lock, flags); + atomic_dec(&mad_agent_priv->refcount); + goto error; + } } - } } return 0; error:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706141655.v5EGtNxr079773>