[PATCH] powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize

29 views
Skip to first unread message

Nathan Chancellor

unread,
Dec 9, 2019, 3:04:06 PM12/9/19
to Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, linuxp...@lists.ozlabs.org, linux-...@vger.kernel.org, clang-bu...@googlegroups.com, Nathan Chancellor
Clang warns:

../arch/powerpc/boot/4xx.c:231:3: warning: misleading indentation;
statement is not part of the previous 'else' [-Wmisleading-indentation]
val = SDRAM0_READ(DDR0_42);
^
../arch/powerpc/boot/4xx.c:227:2: note: previous statement is here
else
^

This is because there is a space at the beginning of this line; remove
it so that the indentation is consistent according to the Linux kernel
coding style and clang no longer warns.

Fixes: d23f5099297c ("[POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library")
Link: https://github.com/ClangBuiltLinux/linux/issues/780
Signed-off-by: Nathan Chancellor <natecha...@gmail.com>
---
arch/powerpc/boot/4xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c
index 1699e9531552..00c4d843a023 100644
--- a/arch/powerpc/boot/4xx.c
+++ b/arch/powerpc/boot/4xx.c
@@ -228,7 +228,7 @@ void ibm4xx_denali_fixup_memsize(void)
dpath = 8; /* 64 bits */

/* get address pins (rows) */
- val = SDRAM0_READ(DDR0_42);
+ val = SDRAM0_READ(DDR0_42);

row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
if (row > max_row)
--
2.24.0

Nick Desaulniers

unread,
Dec 9, 2019, 4:12:47 PM12/9/19
to Nathan Chancellor, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, linuxppc-dev, LKML, clang-built-linux
On Mon, Dec 9, 2019 at 12:04 PM Nathan Chancellor
<natecha...@gmail.com> wrote:
>
> Clang warns:
>
> ../arch/powerpc/boot/4xx.c:231:3: warning: misleading indentation;
> statement is not part of the previous 'else' [-Wmisleading-indentation]
> val = SDRAM0_READ(DDR0_42);
> ^
> ../arch/powerpc/boot/4xx.c:227:2: note: previous statement is here
> else
> ^
>
> This is because there is a space at the beginning of this line; remove
> it so that the indentation is consistent according to the Linux kernel
> coding style and clang no longer warns.
>
> Fixes: d23f5099297c ("[POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library")

ah, can even see it in the diff. Thanks for the patch.
Reviewed-by: Nick Desaulniers <ndesau...@google.com>

> Link: https://github.com/ClangBuiltLinux/linux/issues/780
> Signed-off-by: Nathan Chancellor <natecha...@gmail.com>
> ---
> arch/powerpc/boot/4xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c
> index 1699e9531552..00c4d843a023 100644
> --- a/arch/powerpc/boot/4xx.c
> +++ b/arch/powerpc/boot/4xx.c
> @@ -228,7 +228,7 @@ void ibm4xx_denali_fixup_memsize(void)
> dpath = 8; /* 64 bits */
>
> /* get address pins (rows) */
> - val = SDRAM0_READ(DDR0_42);
> + val = SDRAM0_READ(DDR0_42);
>
> row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
> if (row > max_row)
> --
> 2.24.0
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-li...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191209200338.12546-1-natechancellor%40gmail.com.



--
Thanks,
~Nick Desaulniers

Michael Ellerman

unread,
Jan 6, 2020, 6:33:23 PM1/6/20
to Nathan Chancellor, Benjamin Herrenschmidt, Paul Mackerras, clang-bu...@googlegroups.com, Nathan Chancellor, linuxp...@lists.ozlabs.org, linux-...@vger.kernel.org
On Mon, 2019-12-09 at 20:03:38 UTC, Nathan Chancellor wrote:
> Clang warns:
>
> ../arch/powerpc/boot/4xx.c:231:3: warning: misleading indentation;
> statement is not part of the previous 'else' [-Wmisleading-indentation]
> val = SDRAM0_READ(DDR0_42);
> ^
> ../arch/powerpc/boot/4xx.c:227:2: note: previous statement is here
> else
> ^
>
> This is because there is a space at the beginning of this line; remove
> it so that the indentation is consistent according to the Linux kernel
> coding style and clang no longer warns.
>
> Fixes: d23f5099297c ("[POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library")
> Link: https://github.com/ClangBuiltLinux/linux/issues/780
> Signed-off-by: Nathan Chancellor <natecha...@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c3aae14e5d468d18dbb5d7c0c8c7e2968cc14aad

cheers
Reply all
Reply to author
Forward
0 new messages