All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND] scsi: mvsas: fix misleading indentation
@ 2015-11-30 14:32 Luis de Bethencourt
  2015-12-01  1:55 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Luis de Bethencourt @ 2015-11-30 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: vinholikatti, JBottomley, jthumshirn, linux-scsi, akpm,
	Luis de Bethencourt

Fix a smatch warning:
drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended?

The code is correct, the indention is misleading. When the device is not
ready we want to return SAS_PHY_DOWN. But current indentation makes it
look like we only do so in the else branch of if (mvi_dev).

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
---

Hi, 

This is a resend of a patch from October 19th [0]

Adding Andrew Morton to the CC list, as recommended at Korea Linux Forum.

Thanks,
Luis

[0] https://lkml.org/lkml/2015/10/19/775

 drivers/scsi/mvsas/mv_sas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 9c78074..e712fe7 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -737,8 +737,8 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
 			mv_dprintk("device %016llx not ready.\n",
 				SAS_ADDR(dev->sas_addr));
 
-			rc = SAS_PHY_DOWN;
-			return rc;
+		rc = SAS_PHY_DOWN;
+		return rc;
 	}
 	tei.port = dev->port->lldd_port;
 	if (tei.port && !tei.port->port_attached && !tmf) {
-- 
2.5.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESEND] scsi: mvsas: fix misleading indentation
  2015-11-30 14:32 [RESEND] scsi: mvsas: fix misleading indentation Luis de Bethencourt
@ 2015-12-01  1:55 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2015-12-01  1:55 UTC (permalink / raw)
  To: Luis de Bethencourt
  Cc: linux-kernel, vinholikatti, JBottomley, jthumshirn, linux-scsi, akpm

>>>>> "Luis" == Luis de Bethencourt <luisbg@osg.samsung.com> writes:

Luis> Fix a smatch warning: drivers/scsi/mvsas/mv_sas.c:740
Luis> mvs_task_prep() warn: curly braces intended?

Luis> The code is correct, the indention is misleading. When the device
Luis> is not ready we want to return SAS_PHY_DOWN. But current
Luis> indentation makes it look like we only do so in the else branch of
Luis> if (mvi_dev).

Applied to 4.5/scsi-queue.

Thank you!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-01  1:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 14:32 [RESEND] scsi: mvsas: fix misleading indentation Luis de Bethencourt
2015-12-01  1:55 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.