* [PATCH][next] scsi: pm80xx: clean up indentation of a code block
@ 2021-01-15 9:58 Colin King
2021-01-15 10:33 ` Jinpu Wang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin King @ 2021-01-15 9:58 UTC (permalink / raw)
To: Jack Wang, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
A block of code is indented one level too deeply, clean this
up.
Addresses-Coverity: ("Indentation does not match nesting level")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/pm8001/pm80xx_hwi.c | 34 ++++++++++++++------------------
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index e7fef42b4f6c..6fd206abc9fc 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -358,26 +358,22 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
MEMBASE_II_SHIFT_REGISTER,
pm8001_ha->fatal_forensic_shift_offset);
}
- /* Read the next block of the debug data.*/
- length_to_read = pm8001_mr32(fatal_table_address,
- MPI_FATAL_EDUMP_TABLE_ACCUM_LEN) -
- pm8001_ha->forensic_preserved_accumulated_transfer;
- if (length_to_read != 0x0) {
- pm8001_ha->forensic_fatal_step = 0;
- goto moreData;
- } else {
- pm8001_ha->forensic_info.data_buf.direct_data +=
- sprintf(
- pm8001_ha->forensic_info.data_buf.direct_data,
+ /* Read the next block of the debug data.*/
+ length_to_read = pm8001_mr32(fatal_table_address,
+ MPI_FATAL_EDUMP_TABLE_ACCUM_LEN) -
+ pm8001_ha->forensic_preserved_accumulated_transfer;
+ if (length_to_read != 0x0) {
+ pm8001_ha->forensic_fatal_step = 0;
+ goto moreData;
+ } else {
+ pm8001_ha->forensic_info.data_buf.direct_data +=
+ sprintf(pm8001_ha->forensic_info.data_buf.direct_data,
"%08x ", 4);
- pm8001_ha->forensic_info.data_buf.read_len
- = 0xFFFFFFFF;
- pm8001_ha->forensic_info.data_buf.direct_len
- = 0;
- pm8001_ha->forensic_info.data_buf.direct_offset
- = 0;
- pm8001_ha->forensic_info.data_buf.read_len = 0;
- }
+ pm8001_ha->forensic_info.data_buf.read_len = 0xFFFFFFFF;
+ pm8001_ha->forensic_info.data_buf.direct_len = 0;
+ pm8001_ha->forensic_info.data_buf.direct_offset = 0;
+ pm8001_ha->forensic_info.data_buf.read_len = 0;
+ }
}
offset = (int)((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][next] scsi: pm80xx: clean up indentation of a code block
2021-01-15 9:58 [PATCH][next] scsi: pm80xx: clean up indentation of a code block Colin King
@ 2021-01-15 10:33 ` Jinpu Wang
2021-01-21 2:39 ` Martin K. Petersen
2021-01-23 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Jinpu Wang @ 2021-01-15 10:33 UTC (permalink / raw)
To: Colin King
Cc: James E . J . Bottomley, Martin K . Petersen,
Linux SCSI Mailinglist, kernel-janitors, open list
On Fri, Jan 15, 2021 at 10:58 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> A block of code is indented one level too deeply, clean this
> up.
>
> Addresses-Coverity: ("Indentation does not match nesting level")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> ---
> drivers/scsi/pm8001/pm80xx_hwi.c | 34 ++++++++++++++------------------
> 1 file changed, 15 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index e7fef42b4f6c..6fd206abc9fc 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -358,26 +358,22 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
> MEMBASE_II_SHIFT_REGISTER,
> pm8001_ha->fatal_forensic_shift_offset);
> }
> - /* Read the next block of the debug data.*/
> - length_to_read = pm8001_mr32(fatal_table_address,
> - MPI_FATAL_EDUMP_TABLE_ACCUM_LEN) -
> - pm8001_ha->forensic_preserved_accumulated_transfer;
> - if (length_to_read != 0x0) {
> - pm8001_ha->forensic_fatal_step = 0;
> - goto moreData;
> - } else {
> - pm8001_ha->forensic_info.data_buf.direct_data +=
> - sprintf(
> - pm8001_ha->forensic_info.data_buf.direct_data,
> + /* Read the next block of the debug data.*/
> + length_to_read = pm8001_mr32(fatal_table_address,
> + MPI_FATAL_EDUMP_TABLE_ACCUM_LEN) -
> + pm8001_ha->forensic_preserved_accumulated_transfer;
> + if (length_to_read != 0x0) {
> + pm8001_ha->forensic_fatal_step = 0;
> + goto moreData;
> + } else {
> + pm8001_ha->forensic_info.data_buf.direct_data +=
> + sprintf(pm8001_ha->forensic_info.data_buf.direct_data,
> "%08x ", 4);
> - pm8001_ha->forensic_info.data_buf.read_len
> - = 0xFFFFFFFF;
> - pm8001_ha->forensic_info.data_buf.direct_len
> - = 0;
> - pm8001_ha->forensic_info.data_buf.direct_offset
> - = 0;
> - pm8001_ha->forensic_info.data_buf.read_len = 0;
> - }
> + pm8001_ha->forensic_info.data_buf.read_len = 0xFFFFFFFF;
> + pm8001_ha->forensic_info.data_buf.direct_len = 0;
> + pm8001_ha->forensic_info.data_buf.direct_offset = 0;
> + pm8001_ha->forensic_info.data_buf.read_len = 0;
> + }
> }
> offset = (int)((char *)pm8001_ha->forensic_info.data_buf.direct_data
> - (char *)buf);
> --
> 2.29.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] scsi: pm80xx: clean up indentation of a code block
2021-01-15 9:58 [PATCH][next] scsi: pm80xx: clean up indentation of a code block Colin King
2021-01-15 10:33 ` Jinpu Wang
@ 2021-01-21 2:39 ` Martin K. Petersen
2021-01-23 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-01-21 2:39 UTC (permalink / raw)
To: Colin King
Cc: Jack Wang, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
Colin,
> A block of code is indented one level too deeply, clean this up.
Applied to 5.12/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] scsi: pm80xx: clean up indentation of a code block
2021-01-15 9:58 [PATCH][next] scsi: pm80xx: clean up indentation of a code block Colin King
2021-01-15 10:33 ` Jinpu Wang
2021-01-21 2:39 ` Martin K. Petersen
@ 2021-01-23 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-01-23 4:22 UTC (permalink / raw)
To: Colin King, Jack Wang, linux-scsi, James E . J . Bottomley
Cc: Martin K . Petersen, linux-kernel, kernel-janitors
On Fri, 15 Jan 2021 09:58:24 +0000, Colin King wrote:
> A block of code is indented one level too deeply, clean this
> up.
Applied to 5.12/scsi-queue, thanks!
[1/1] scsi: pm80xx: clean up indentation of a code block
https://git.kernel.org/mkp/scsi/c/7b382122d276
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-23 4:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 9:58 [PATCH][next] scsi: pm80xx: clean up indentation of a code block Colin King
2021-01-15 10:33 ` Jinpu Wang
2021-01-21 2:39 ` Martin K. Petersen
2021-01-23 4:22 ` 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).