From patchwork Mon Mar 14 14:29:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102589 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp70199lbc; Mon, 14 Mar 2016 07:30:48 -0700 (PDT) X-Received: by 10.66.147.103 with SMTP id tj7mr38597332pab.72.1457965848266; Mon, 14 Mar 2016 07:30:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ey9si1307193pab.123.2016.03.14.07.30.47 for ; Mon, 14 Mar 2016 07:30:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934393AbcCNOaq (ORCPT ); Mon, 14 Mar 2016 10:30:46 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:61907 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932864AbcCNOap (ORCPT ); Mon, 14 Mar 2016 10:30:45 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0M5Ozn-1ZthvA2pjz-00zXQt; Mon, 14 Mar 2016 15:30:27 +0100 From: Arnd Bergmann To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, James Smart , Dick Kennedy , "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Hannes Reinecke , Sebastian Herbszt Subject: [PATCH 2/3] lpfc: fix misleading indentation Date: Mon, 14 Mar 2016 15:29:44 +0100 Message-Id: <1457965789-3373916-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457965789-3373916-1-git-send-email-arnd@arndb.de> References: <1457965789-3373916-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:A4q6FAI0ZhFSs4eSL63aZzi3THnTgJ7CMgAohW0FzebFlqXnIFC Wgq7hanssvqmMwchZ2ZJKdLc2RxnmIY/JIoHT0mzzMRi7r1tqklx/aQpVIps4r0fJ00bBnd yMiL3CrW9W/8US319Hq0iN9UKn82PogPfoRgf4+fOdH5ruGzrbuKcHvIbaVfKDM3/Qh97Ve ivybIOjpk9KMmUg8i0o2Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:5jtDU7Pteuk=:DGqBL2uRIz/8/E15ag6tMG vtWRKs5lGE2dJ+HsT/Rg4CwqHIsvYUfNlMMZ7ldhhWBOATFUXiDAAJhqiChdK3g/hdSVa6UVa nCIW7UG2jWDhtlqRBU2DvjWCBT3R3UJ/JBEnOrEUk3sW3WC4gimZikfGCtcDvJWsF3SyH56a1 zBVdW4z8D/EepHm33JYq9JGvLa9SD5CXMz/F1sXz3arueYo2gW3qetHcDO9uqRzaBULR8riT/ rYpkLRDbydEVQymOhq11oi66K5yRKC8B/6R+i4MR/ypY5AC7cI/eIYWCiKS4QXQ5W9OyOjtzf Cp43R+lPBoeYwuMS+dQ6oHY2EzCSiUS5ts/TjlYFMja3lYpg3ukHMoyOcQcz+Ynh5M4VlIOh6 7mspaOJ3SBojjIUSA/FnSamYAo1zTV92RHNdTiCOwF8N0IvHIhVeg+UOXOhHvmuGZxqyVYeim pCPZVRSTKEjajbCJMpHmlQaT9dt0pugozXkvZ3V2vRybe5ZS9x36Q3V/60R95opIZNOrXCJKs ifsEUt4H4JOMT519h/BerBfG1t0KxFWnZ+gBk5w2F5CDKWbrer9AkNPgE6BeVbjmg2N9vs2F7 XhTN88dyNfHfHyrKmYPqHh7ManCVbqCjDyN5Z9nj4ShFUTi8mFQ80Uv5Rl9cckX+cRmV3Jd3V 9hUWTDvXpi7aRDykrUr5ioqR3I6dDEYvwzevyLj5wNF+pr3EAb6oGP0wM5DUUpQITL/0= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array() call in lpfc_online(), which clearly doesn't look right: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online': drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] lpfc_destroy_vport_work_array(phba, vports); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not if (vports != NULL) ^~ Looking at the patch that introduced this code, it's clear that the behavior is correct and the indentation is wrong. This fixes the indentation and adds curly braces around the previous if() block for clarity, as that is most likely what caused the code to be misindented in the first place. Signed-off-by: Arnd Bergmann Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list") --- drivers/scsi/lpfc/lpfc_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index a544366a367e..f57d02c3b6cf 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -2860,7 +2860,7 @@ lpfc_online(struct lpfc_hba *phba) } vports = lpfc_create_vport_work_array(phba); - if (vports != NULL) + if (vports != NULL) { for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { struct Scsi_Host *shost; shost = lpfc_shost_from_vport(vports[i]); @@ -2877,7 +2877,8 @@ lpfc_online(struct lpfc_hba *phba) } spin_unlock_irq(shost->host_lock); } - lpfc_destroy_vport_work_array(phba, vports); + } + lpfc_destroy_vport_work_array(phba, vports); lpfc_unblock_mgmt_io(phba); return 0;