提交 369e8ee8 编写于 作者: A Anders Roxell 提交者: Zheng Zengkai

powerpc/cell: Fix clang -Wimplicit-fallthrough warning

stable inclusion
from stable-v5.10.94
commit 19aaef65194854e8e880084f52645fb77b54188d
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=19aaef65194854e8e880084f52645fb77b54188d

--------------------------------

commit e89257e2 upstream.

Clang warns:

arch/powerpc/platforms/cell/pervasive.c:81:2: error: unannotated fall-through between switch labels
        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: 6e83985b ("powerpc/cbe: Do not process external or decremeter interrupts from sreset")
Reported-by: NNaresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: NAnders Roxell <anders.roxell@linaro.org>
Reviewed-by: NNathan Chancellor <nathan@kernel.org>
Reviewed-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211207110228.698956-1-anders.roxell@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 f789433d
...@@ -77,6 +77,7 @@ static int cbe_system_reset_exception(struct pt_regs *regs) ...@@ -77,6 +77,7 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
switch (regs->msr & SRR1_WAKEMASK) { switch (regs->msr & SRR1_WAKEMASK) {
case SRR1_WAKEDEC: case SRR1_WAKEDEC:
set_dec(1); set_dec(1);
break;
case SRR1_WAKEEE: case SRR1_WAKEEE:
/* /*
* Handle these when interrupts get re-enabled and we take * Handle these when interrupts get re-enabled and we take
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册