[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zgpamgbr.fsf@mpe.ellerman.id.au>
Date: Thu, 09 Dec 2021 17:40:24 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Anders Roxell <anders.roxell@...aro.org>, arnd@...db.de
Cc: nathan@...nel.org, ndesaulniers@...gle.com,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Anders Roxell <anders.roxell@...aro.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>
Subject: Re: [PATCH] powerpc: platforms: cell: pervasive: fix clang
-Wimplicit-fallthrough
Anders Roxell <anders.roxell@...aro.org> writes:
> Clang warns:
>
> arch/powerpc/platforms/cell/pervasive.c:81:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
> case SRR1_WAKEEE:
> ^
> arch/powerpc/platforms/cell/pervasive.c:81:2: note: insert 'break;' to avoid fall-through
> case SRR1_WAKEEE:
> ^
> break;
> 1 error generated.
>
> Clang is more pedantic than GCC, which does not warn when failing
> through to a case that is just break or return. Clang's version
> is more in line with the kernel's own stance in deprecated.rst.
> Add athe missing break to silence the warning.
>
> Fixes: 6e83985b0f6e ("powerpc/cbe: Do not process external or decremeter interrupts from sreset")
> Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
> Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
> ---
> arch/powerpc/platforms/cell/pervasive.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
> index 5b9a7e9f144b..dff8d5e7ab82 100644
> --- a/arch/powerpc/platforms/cell/pervasive.c
> +++ b/arch/powerpc/platforms/cell/pervasive.c
> @@ -78,6 +78,7 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
> switch (regs->msr & SRR1_WAKEMASK) {
> case SRR1_WAKEDEC:
> set_dec(1);
> + break;
> case SRR1_WAKEEE:
> /*
> * Handle these when interrupts get re-enabled and we take
Thanks. I have definitely fixed this somewhere before, but I guess I
never sent it upstream, or it's still lying in a git stash of mine.
cheers
Powered by blists - more mailing lists