linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Sebastian Herbszt <herbszt@gmx.de>,
	Hannes Reinecke <hare@suse.com>,
	"Ewan D. Milne" <emilne@redhat.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH 3.14 07/23] lpfc: fix misleading indentation
Date: Mon,  9 May 2016 09:17:27 +0200	[thread overview]
Message-ID: <20160509071647.110304024@linuxfoundation.org> (raw)
In-Reply-To: <20160509071646.726412064@linuxfoundation.org>

3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Arnd Bergmann <arnd@arndb.de>

commit aeb6641f8ebdd61939f462a8255b316f9bfab707 upstream.

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 <arnd@arndb.de>
Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list")
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/lpfc/lpfc_init.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2697,7 +2697,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]);
@@ -2714,7 +2714,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;

  parent reply	other threads:[~2016-05-09  7:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09  7:17 [PATCH 3.14 00/23] 3.14.69-stable review Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 01/23] compiler-gcc: integrate the various compiler-gcc[345].h files Greg Kroah-Hartman
2016-05-11  9:27   ` Jiri Slaby
2016-05-14 23:41     ` Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 02/23] compiler-gcc: disable -ftracer for __noclone functions Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 04/23] ipvs: correct initial offset of Call-ID header search in SIP persistence engine Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 05/23] nbd: ratelimit error msgs after socket close Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 06/23] clk: versatile: sp810: support reentrance Greg Kroah-Hartman
2016-05-09  7:17 ` Greg Kroah-Hartman [this message]
2016-05-09  7:17 ` [PATCH 3.14 08/23] tracing: Dont display trigger file for events that cant be enabled Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 09/23] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 10/23] Input: zforce_ts - fix dual touch recognition Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 11/23] proc: prevent accessing /proc/<PID>/environ until its ready Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 12/23] batman-adv: Check skb size before using encapsulated ETH+VLAN header Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 14/23] batman-adv: Reduce refcnt of removed router when updating route Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 15/23] MAINTAINERS: Remove asterisk from EFI directory names Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 16/23] x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 17/23] x86/sysfb_efi: Fix valid BAR address range check Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 18/23] ACPICA: Dispatcher: Update thread ID for recursive method calls Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 19/23] USB: serial: cp210x: add ID for Link ECU Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 20/23] USB: serial: cp210x: add Straizona Focusers device ids Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 21/23] iio: ak8975: Fix NULL pointer exception on early interrupt Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 22/23] Input: ads7846 - correct the value got from SPI Greg Kroah-Hartman
2016-05-09  7:17 ` [PATCH 3.14 23/23] powerpc: scan_features() updates incorrect bits for REAL_LE Greg Kroah-Hartman
2016-05-09 13:20 ` [PATCH 3.14 00/23] 3.14.69-stable review Guenter Roeck
2016-05-09 19:40 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160509071647.110304024@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=emilne@redhat.com \
    --cc=hare@suse.com \
    --cc=herbszt@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).