From patchwork Wed Feb 8 21:19:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9563539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 785F46020F for ; Wed, 8 Feb 2017 21:51:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C72D28437 for ; Wed, 8 Feb 2017 21:51:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60AD62852C; Wed, 8 Feb 2017 21:51:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19ACD28437 for ; Wed, 8 Feb 2017 21:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751444AbdBHVve (ORCPT ); Wed, 8 Feb 2017 16:51:34 -0500 Received: from mout.web.de ([212.227.15.14]:58884 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942AbdBHVvT (ORCPT ); Wed, 8 Feb 2017 16:51:19 -0500 Received: from [192.168.1.2] ([77.181.90.255]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lg3bv-1c3ebN2nnf-00pciZ; Wed, 08 Feb 2017 22:19:42 +0100 Subject: [PATCH 09/14] RDMA/cxgb4: Use common error handling code in recover_lost_dbs() To: linux-rdma@vger.kernel.org, Doug Ledford , Hal Rosenstock , Sean Hefty , Steve Wise References: <0aff92fa-2891-333a-2e1e-ca309db2ec72@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <3da7cff6-9f94-2ae8-a173-7ad6efdb524b@users.sourceforge.net> Date: Wed, 8 Feb 2017 22:19:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <0aff92fa-2891-333a-2e1e-ca309db2ec72@users.sourceforge.net> X-Provags-ID: V03:K0:pTuLfbnKBbMbJh0cGc5POqJtFzlNcpPsDJdInGpzzo9cyZwSySi ZzQnzCs3WK5H/fGnyylsS63a1YK+0ppWJ7odpGNDwsqbRrjvXatGl4xMv5I81MXygYo4xXK WbPiNMeI8diH5C2HdrnvWe+cae+3gckwb7wGdqso06oO+VpT+LPy53Sr3IsCstlqtN7FmOn XjOOum0uOZGRTGSS8Tupw== X-UI-Out-Filterresults: notjunk:1; V01:K0:2XlHyR3lYxA=:8XWBkjz7pvukpYEQu6LVht 8v/dPTnLmJS86hIM401NKX32561SlgJxTJz+vZyzRc42BLlVQs2Mty0e9jpQ3RCHbx1JxN8LS 59DG3MCdjH6XHH/51axJYLMqleyPT4uV3Oo/5bGfSX7mDSpwxYr037Wa+b7Co9yNziEJfwhgB 08Z3OPz56D51zwIhMP5koel66AavLijyn9rpG4ZuNyqoqBizemOckvObgBuvmcl/Tx12V8mZg GG3S2dfCOQwCA0FXNKDF2NhPBJvn3bg3HHbE53Pfjw7UQxbdNtujoqtVyCKBpN8H04BhkW626 jQYHhmM6mThiQuUNfqussf744YlDqoD8MXDozD4LG48y+kcy001xP+WXXwzGUsl1zslu4WWKT M+WVrl0eGI0Wgq7KGhSNYxoSyWqdMgHHBtk2LeL6rsggFsA+d99qCsGYW5TwRjegIvALBx1kF 10xaB6g9AZH/V9uIv464Ny1UJepj/XVX6H1ALJoNQ6iAYaBv64SzdnFvowLAzG56ZLCrIVfEg uTNLWBWiZYHuPLuWEgWpU1Bka316ufe4HigrZtsJq2YTKe9EUKOmBv6VACFl9W8hiKx1WNs4w b/RnsedHJXSdXLu5PSQLsgexonr6ShgUl0lg4Nd5Zrjms3vrjkhtta0fG21dsVOHGpSDEdx8I 7iUtIjcgpzyu7Rj/7Do/pIA2QOaPbqaDhAJSitSr3Hin0ypgAcSQ28jh19NBaIIc8fixyQ92U XKTJoX30UAlBC4K01+uycllYNEc5H9Jd1JGhzN8mBLg48w3EIdooNCo9mqcP8NUfRYq6TWmR8 nBX1p/F Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 8 Feb 2017 18:08:08 +0100 Add a jump target so that a bit of exception handling can be better reused from an in branch in this function. Signed-off-by: Markus Elfring --- drivers/infiniband/hw/cxgb4/device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index 2931920d7c4c..86cf7026619f 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c @@ -1402,9 +1402,7 @@ static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list) pci_name(ctx->lldi.pdev), ": Fatal error - DB overflow recovery failed - error syncing ", qp->wq.sq.qid); - spin_unlock(&qp->lock); - spin_unlock_irq(&qp->rhp->lock); - return; + goto unlock; } qp->wq.sq.wq_pidx_inc = 0; @@ -1418,6 +1416,7 @@ static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list) pci_name(ctx->lldi.pdev), ": Fatal error - DB overflow recovery failed - error syncing ", qp->wq.rq.qid); +unlock: spin_unlock(&qp->lock); spin_unlock_irq(&qp->rhp->lock); return;