linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
@ 2019-12-18  1:52 Nathan Chancellor
  2019-12-19  5:55 ` Manish Rangankar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nathan Chancellor @ 2019-12-18  1:52 UTC (permalink / raw)
  To: QLogic-Storage-Upstream, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-scsi, linux-kernel, clang-built-linux, Nathan Chancellor

Clang warns:

../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading
indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
         if (ha->fw_dump)
         ^
../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is
here
        if (ha->queues)
        ^
1 warning generated.

This warning occurs because there is a space after the tab on this line.
Remove it so that the indentation is consistent with the Linux kernel
coding style and clang no longer warns.

Fixes: 068237c87c64 ("[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure")
Link: https://github.com/ClangBuiltLinux/linux/issues/819
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 2323432a0edb..5504ab11decc 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -4145,7 +4145,7 @@ static void qla4xxx_mem_free(struct scsi_qla_host *ha)
 		dma_free_coherent(&ha->pdev->dev, ha->queues_len, ha->queues,
 				  ha->queues_dma);
 
-	 if (ha->fw_dump)
+	if (ha->fw_dump)
 		vfree(ha->fw_dump);
 
 	ha->queues_len = 0;
-- 
2.24.1


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

* RE: [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
  2019-12-18  1:52 [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free Nathan Chancellor
@ 2019-12-19  5:55 ` Manish Rangankar
  2019-12-19 20:22 ` Nick Desaulniers
  2019-12-19 23:46 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Manish Rangankar @ 2019-12-19  5:55 UTC (permalink / raw)
  To: Nathan Chancellor, QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen
  Cc: linux-scsi, linux-kernel, clang-built-linux


> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org <linux-scsi-
> owner@vger.kernel.org> On Behalf Of Nathan Chancellor
> Sent: Wednesday, December 18, 2019 7:23 AM
> To: QLogic-Storage-Upstream@qlogic.com; James E.J. Bottomley
> <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; clang-built-
> linux@googlegroups.com; Nathan Chancellor <natechancellor@gmail.com>
> Subject: [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
> 
> Clang warns:
> 
> ../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading indentation;
> statement is not part of the previous 'if'
> [-Wmisleading-indentation]
>          if (ha->fw_dump)
>          ^
> ../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is here
>         if (ha->queues)
>         ^
> 1 warning generated.
> 
> This warning occurs because there is a space after the tab on this line.
> Remove it so that the indentation is consistent with the Linux kernel coding
> style and clang no longer warns.
> 
> Fixes: 068237c87c64 ("[SCSI] qla4xxx: Capture minidump for ISP82XX on
> firmware failure")
> Link: https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_ClangBuiltLinux_linux_issues_819&d=DwIDAg&c=nKjWec
> 2b6R0mOyPaz7xtfQ&r=At6ko6G2bmE5NMB-
> 6KMSliwRneAzZrOmmK21YHGCrqw&m=uRvAonUUcyFaz2S6vZ8po-
> QrrPYNB3gw84QZKl9wS78&s=t3EPVR3mOgGj_emNe0i_rdomyiK4K9noSBB
> WMFBt2Ag&e=
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/scsi/qla4xxx/ql4_os.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 2323432a0edb..5504ab11decc 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -4145,7 +4145,7 @@ static void qla4xxx_mem_free(struct
> scsi_qla_host *ha)
>  		dma_free_coherent(&ha->pdev->dev, ha->queues_len, ha-
> >queues,
>  				  ha->queues_dma);
> 
> -	 if (ha->fw_dump)
> +	if (ha->fw_dump)
>  		vfree(ha->fw_dump);
> 
>  	ha->queues_len = 0;
> --

Thanks
Acked-by: Manish Rangankar <mrangankar@marvell.com>

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

* Re: [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
  2019-12-18  1:52 [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free Nathan Chancellor
  2019-12-19  5:55 ` Manish Rangankar
@ 2019-12-19 20:22 ` Nick Desaulniers
  2019-12-19 23:46 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2019-12-19 20:22 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, LKML, clang-built-linux

On Tue, Dec 17, 2019 at 5:52 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> Clang warns:
>
> ../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading
> indentation; statement is not part of the previous 'if'
> [-Wmisleading-indentation]
>          if (ha->fw_dump)
>          ^
> ../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is
> here
>         if (ha->queues)
>         ^
> 1 warning generated.
>
> This warning occurs because there is a space after the tab on this line.
> Remove it so that the indentation is consistent with the Linux kernel
> coding style and clang no longer warns.
>
> Fixes: 068237c87c64 ("[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure")
> Link: https://github.com/ClangBuiltLinux/linux/issues/819
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  drivers/scsi/qla4xxx/ql4_os.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 2323432a0edb..5504ab11decc 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -4145,7 +4145,7 @@ static void qla4xxx_mem_free(struct scsi_qla_host *ha)
>                 dma_free_coherent(&ha->pdev->dev, ha->queues_len, ha->queues,
>                                   ha->queues_dma);
>
> -        if (ha->fw_dump)
> +       if (ha->fw_dump)
>                 vfree(ha->fw_dump);
>
>         ha->queues_len = 0;
> --

-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
  2019-12-18  1:52 [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free Nathan Chancellor
  2019-12-19  5:55 ` Manish Rangankar
  2019-12-19 20:22 ` Nick Desaulniers
@ 2019-12-19 23:46 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2019-12-19 23:46 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, linux-kernel, clang-built-linux


Nathan,

> Clang warns:
>
> ../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading
> indentation; statement is not part of the previous 'if'
> [-Wmisleading-indentation]
>          if (ha->fw_dump)
>          ^
> ../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is

Applied to 5.6/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2019-12-19 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18  1:52 [PATCH] scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free Nathan Chancellor
2019-12-19  5:55 ` Manish Rangankar
2019-12-19 20:22 ` Nick Desaulniers
2019-12-19 23:46 ` 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).