linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready()
@ 2016-08-03 18:42 Dan Carpenter
  2016-08-04 22:20 ` Himanshu Madhani
  2016-08-09  1:29 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-08-03 18:42 UTC (permalink / raw)
  To: qla2xxx-upstream, Sawan Chandak
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	kernel-janitors

The "if (test_bit(UNLOADING..." line was indented one tab more than it
should have been.  There was an extra parenthesis around the
qla2x00_reset_active() function call.  I lined up the conditions a bit
so that it shows how they group together.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 2674f4c..1dd8650 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -899,12 +899,12 @@ qla2x00_wait_for_hba_ready(scsi_qla_host_t *vha)
 	struct qla_hw_data *ha = vha->hw;
 	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
 
-	while (((qla2x00_reset_active(vha)) || ha->dpc_active ||
-	    ha->flags.mbox_busy) ||
-		test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags) ||
-		test_bit(FX00_TARGET_SCAN, &vha->dpc_flags)) {
-			if (test_bit(UNLOADING, &base_vha->dpc_flags))
-				break;
+	while ((qla2x00_reset_active(vha) || ha->dpc_active ||
+		ha->flags.mbox_busy) ||
+	       test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags) ||
+	       test_bit(FX00_TARGET_SCAN, &vha->dpc_flags)) {
+		if (test_bit(UNLOADING, &base_vha->dpc_flags))
+			break;
 		msleep(1000);
 	}
 }

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

* Re: [patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready()
  2016-08-03 18:42 [patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready() Dan Carpenter
@ 2016-08-04 22:20 ` Himanshu Madhani
  2016-08-09  1:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Himanshu Madhani @ 2016-08-04 22:20 UTC (permalink / raw)
  To: Dan Carpenter, Dept-Eng QLA2xxx Upstream, Sawan Chandak
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	kernel-janitors@vger.kernel.org


On 8/3/16, 11:42 AM, "Dan Carpenter" <dan.carpenter@oracle.com> wrote:

>The "if (test_bit(UNLOADING..." line was indented one tab more than it
>should have been.  There was an extra parenthesis around the
>qla2x00_reset_active() function call.  I lined up the conditions a bit
>so that it shows how they group together.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
>diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
>index 2674f4c..1dd8650 100644
>--- a/drivers/scsi/qla2xxx/qla_os.c
>+++ b/drivers/scsi/qla2xxx/qla_os.c
>@@ -899,12 +899,12 @@ qla2x00_wait_for_hba_ready(scsi_qla_host_t *vha)
> 	struct qla_hw_data *ha = vha->hw;
> 	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
> 
>-	while (((qla2x00_reset_active(vha)) || ha->dpc_active ||
>-	    ha->flags.mbox_busy) ||
>-		test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags) ||
>-		test_bit(FX00_TARGET_SCAN, &vha->dpc_flags)) {
>-			if (test_bit(UNLOADING, &base_vha->dpc_flags))
>-				break;
>+	while ((qla2x00_reset_active(vha) || ha->dpc_active ||
>+		ha->flags.mbox_busy) ||
>+	       test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags) ||
>+	       test_bit(FX00_TARGET_SCAN, &vha->dpc_flags)) {
>+		if (test_bit(UNLOADING, &base_vha->dpc_flags))
>+			break;
> 		msleep(1000);
> 	}
> }

Looks Good.

Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
>

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

* Re: [patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready()
  2016-08-03 18:42 [patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready() Dan Carpenter
  2016-08-04 22:20 ` Himanshu Madhani
@ 2016-08-09  1:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-08-09  1:29 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: qla2xxx-upstream, Sawan Chandak, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, kernel-janitors

>>>>> "Dan" == Dan Carpenter <dan.carpenter@oracle.com> writes:

Dan> The "if (test_bit(UNLOADING..." line was indented one tab more than
Dan> it should have been.  There was an extra parenthesis around the
Dan> qla2x00_reset_active() function call.  I lined up the conditions a
Dan> bit so that it shows how they group together.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-08-09  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 18:42 [patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready() Dan Carpenter
2016-08-04 22:20 ` Himanshu Madhani
2016-08-09  1:29 ` Martin K. Petersen

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).