From: Joe Perches <joe@perches.com>
To: Jack Wang <jinpu.wang@cloud.ionos.com>
Cc: kernel test robot <lkp@intel.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] scsi: pm8001: Fix misindentation
Date: Mon, 23 Nov 2020 20:36:04 -0800 [thread overview]
Message-ID: <9542a8be9954c1dca744f93f53bb1af6dd1436e8.1606192458.git.joe@perches.com> (raw)
In-Reply-To: <cover.1606192458.git.joe@perches.com>
kernel robot reported a misindentation of a goto.
Fix it.
At the same time, use a temporary for a repeated entry in the same block
to reduce visual noise.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/scsi/pm8001/pm8001_init.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 38907f45c845..17b29163c13d 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -386,17 +386,17 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
pm8001_ha->memoryMap.region[FORENSIC_MEM].element_size = 0x10000;
pm8001_ha->memoryMap.region[FORENSIC_MEM].alignment = 0x10000;
for (i = 0; i < pm8001_ha->max_memcnt; i++) {
+ struct mpi_mem *region = &pm8001_ha->memoryMap.region[i];
+
if (pm8001_mem_alloc(pm8001_ha->pdev,
- &pm8001_ha->memoryMap.region[i].virt_ptr,
- &pm8001_ha->memoryMap.region[i].phys_addr,
- &pm8001_ha->memoryMap.region[i].phys_addr_hi,
- &pm8001_ha->memoryMap.region[i].phys_addr_lo,
- pm8001_ha->memoryMap.region[i].total_len,
- pm8001_ha->memoryMap.region[i].alignment) != 0) {
- pm8001_dbg(pm8001_ha, FAIL,
- "Mem%d alloc failed\n",
- i);
- goto err_out;
+ ®ion->virt_ptr,
+ ®ion->phys_addr,
+ ®ion->phys_addr_hi,
+ ®ion->phys_addr_lo,
+ region->total_len,
+ region->alignment) != 0) {
+ pm8001_dbg(pm8001_ha, FAIL, "Mem%d alloc failed\n", i);
+ goto err_out;
}
}
--
2.26.0
next prev parent reply other threads:[~2020-11-24 4:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 4:36 [PATCH 0/2] scsi: pm8001: Further neatening and whitespace Joe Perches
2020-11-24 4:36 ` [PATCH 1/2] scsi: pm8001: Convert pm8001_printk to pm8001_info Joe Perches
2020-11-24 6:23 ` Jinpu Wang
2020-11-24 4:36 ` Joe Perches [this message]
2020-11-24 6:23 ` [PATCH 2/2] scsi: pm8001: Fix misindentation Jinpu Wang
2020-12-01 4:33 ` [PATCH 0/2] scsi: pm8001: Further neatening and whitespace Martin K. Petersen
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=9542a8be9954c1dca744f93f53bb1af6dd1436e8.1606192458.git.joe@perches.com \
--to=joe@perches.com \
--cc=jejb@linux.ibm.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.com \
/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).