Skip to contentSkip to conversation

scsi: aacraid: clean up some indentation and formatting issues

PATCH Applied Colin King 3 participants 3 messages Feb 2, 2019 – Feb 5, 2019 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 scsi: aacraid: clean up some indentation and formatting issues

From: Colin Ian King <[email protected]>

There are several issues with badly indented statements. Fix these and clean up the formatting.

---
 drivers/scsi/aacraid/commsup.c | 25 +++++++++++++------------
 drivers/scsi/aacraid/linit.c   |  3 +--
 drivers/scsi/aacraid/src.c     |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)
drivers/scsi/aacraid/commsup.c +12 -11
index d5a6aa9676c8..0bdc6b0f725f 100644
@@ -1376,18 +1376,19 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
 
 	container = 0;
 retry_next:
-	if (device_config_needed = NOTHING)
-	for (; container < dev->maximum_num_containers; ++container) {
-		if ((dev->fsa_dev[container].config_waiting_on = 0) &&
-			(dev->fsa_dev[container].config_needed != NOTHING) &&
-			time_before(jiffies, dev->fsa_dev[container].config_waiting_stamp + AIF_SNIFF_TIMEOUT)) {
-			device_config_needed -				dev->fsa_dev[container].config_needed;
-			dev->fsa_dev[container].config_needed = NOTHING;
-			channel = CONTAINER_TO_CHANNEL(container);
-			id = CONTAINER_TO_ID(container);
-			lun = CONTAINER_TO_LUN(container);
-			break;
+	if (device_config_needed = NOTHING) {
+		for (; container < dev->maximum_num_containers; ++container) {
+			if ((dev->fsa_dev[container].config_waiting_on = 0) &&
+			    (dev->fsa_dev[container].config_needed != NOTHING) &&
+			    time_before(jiffies, dev->fsa_dev[container].config_waiting_stamp + AIF_SNIFF_TIMEOUT)) {
+				device_config_needed +					dev->fsa_dev[container].config_needed;
+				dev->fsa_dev[container].config_needed = NOTHING;
+				channel = CONTAINER_TO_CHANNEL(container);
+				id = CONTAINER_TO_ID(container);
+				lun = CONTAINER_TO_LUN(container);
+				break;
+			}
 		}
 	}
 	if (device_config_needed = NOTHING)
drivers/scsi/aacraid/linit.c +1 -2
index 7e56a11836c1..e977b459f823 100644
@@ -852,8 +852,7 @@ static u8 aac_eh_tmf_hard_reset_fib(struct aac_hba_map_info *info,
 
 	address = (u64)fib->hw_error_pa;
 	rst->error_ptr_hi = cpu_to_le32((u32)(address >> 32));
-	rst->error_ptr_lo = cpu_to_le32
-		((u32)(address & 0xffffffff));
+	rst->error_ptr_lo = cpu_to_le32((u32)(address & 0xffffffff));
 	rst->error_length = cpu_to_le32(FW_ERROR_BUFFER_SIZE);
 	fib->hbacmd_size = sizeof(*rst);
 
drivers/scsi/aacraid/src.c +1 -1
index 8377aec0649d..97bb9e9d201c 100644
@@ -1157,7 +1157,7 @@ static int aac_src_soft_reset(struct aac_dev *dev)
 		dev_err(&dev->pdev->dev, "%s: %s status = %d", __func__,
 			state_str[state], rc);
 
-return rc;
+	return rc;
 }
 /**
  *  aac_srcv_init	-	initialize an SRCv card
Signature · 1 line
2.20.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): BYAPR11MB322448EB89EA76E8727A92B3E26C0@BYAPR11MB3224.namprd11.prod.outlook.com

#3 lore raw

---------- Forwarded message ----------
From: Colin King <mailto:[email protected]>
Date: Feb 2, 2019 2:41 AM
Subject: [PATCH] scsi: aacraid: clean up some indentation and formatting issues
To: Adaptec OEM Raid Solutions <mailto:[email protected]>,"James E . J . Bottomley" <mailto:[email protected]>,"Martin K . Petersen" <mailto:[email protected]>,[email protected]
Cc: mailto:[email protected],[email protected]
EXTERNAL EMAIL

From: Colin Ian King <mailto:[email protected]>

There are several issues with badly indented statements. Fix these and clean up the formatting.

---
 drivers/scsi/aacraid/commsup.c | 25 +++++++++++++------------ drivers/scsi/aacraid/linit.c   |  3 +-- drivers/scsi/aacraid/src.c     |  2 +-

 3 files changed, 15 insertions(+), 15 deletions(-)
drivers/scsi/aacraid/commsup.c +0 -0
index d5a6aa9676c8..0bdc6b0f725f 100644
@@ -1376,18 +1376,19 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
 

        container = 0;
 retry_next:
-       if (device_config_needed == NOTHING)
-       for (; container < dev->maximum_num_containers; ++container) {
-               if ((dev->fsa_dev[container].config_waiting_on == 0) &&
-                       (dev->fsa_dev[container].config_needed != NOTHING) &&
-                       time_before(jiffies, dev->fsa_dev[container].config_waiting_stamp + AIF_SNIFF_TIMEOUT)) { -                       device_config_needed =
-                               dev->fsa_dev[container].config_needed;
-                       dev->fsa_dev[container].config_needed = NOTHING;
-                       channel = CONTAINER_TO_CHANNEL(container);
-                       id = CONTAINER_TO_ID(container);
-                       lun = CONTAINER_TO_LUN(container);
-                       break;
+       if (device_config_needed == NOTHING) {
+               for (; container < dev->maximum_num_containers; ++container) {
+                       if ((dev->fsa_dev[container].config_waiting_on == 0) &&
+                           (dev->fsa_dev[container].config_needed != NOTHING) &&
+                           time_before(jiffies, dev->fsa_dev[container].config_waiting_stamp + AIF_SNIFF_TIMEOUT)) { +                               device_config_needed =
+                                       dev->fsa_dev[container].config_needed;
+                               dev->fsa_dev[container].config_needed = NOTHING;
+                               channel = CONTAINER_TO_CHANNEL(container);
+                               id = CONTAINER_TO_ID(container);
+                               lun = CONTAINER_TO_LUN(container);
+                               break;
+                       }
                }
        }
        if (device_config_needed == NOTHING)

drivers/scsi/aacraid/linit.c +0 -0
index 7e56a11836c1..e977b459f823 100644
@@ -852,8 +852,7 @@ static u8 aac_eh_tmf_hard_reset_fib(struct aac_hba_map_info *info,
 

        address = (u64)fib->hw_error_pa;
        rst->error_ptr_hi = cpu_to_le32((u32)(address >> 32)); -       rst->error_ptr_lo = cpu_to_le32
-               ((u32)(address & 0xffffffff));
+       rst->error_ptr_lo = cpu_to_le32((u32)(address & 0xffffffff)); rst->error_length = cpu_to_le32(FW_ERROR_BUFFER_SIZE); fib->hbacmd_size = sizeof(*rst);

drivers/scsi/aacraid/src.c +0 -0
index 8377aec0649d..97bb9e9d201c 100644
@@ -1157,7 +1157,7 @@ static int aac_src_soft_reset(struct aac_dev *dev)

                dev_err(&dev->pdev->dev, "%s: %s status = %d", __func__, state_str[state], rc);

-return rc;
+       return rc;
 }
 /**
  *  aac_srcv_init      -       initialize an SRCv card --
2.20.1

#4 lore raw
In reply to Colin King

Colin,

Quoted 2 lines

There are several issues with badly indented statements. Fix these and clean up the formatting.

Applied to 5.1/scsi-queue, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering