From owner-svn-src-head@freebsd.org Wed Jun 14 16:55:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A7FBEF6AE; Wed, 14 Jun 2017 16:55:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B0A710C5; Wed, 14 Jun 2017 16:55:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5EGtNEv079774; Wed, 14 Jun 2017 16:55:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5EGtNxr079773; Wed, 14 Jun 2017 16:55:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706141655.v5EGtNxr079773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 14 Jun 2017 16:55:23 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 16:55:25 -0000 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: