Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934384AbcCNOaq (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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1763 Lines: 49 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(-) 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; -- 2.7.0