]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthrough
authorNathan Chancellor <nathan@kernel.org>
Wed, 27 Oct 2021 19:08:23 +0000 (12:08 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 28 Oct 2021 12:28:18 +0000 (13:28 +0100)
commitf7a09a679b09242d8f809180d4d80e2d491d8ca2
tree2b9c5fd600dc08feae18215299fb9f69527e3356
parentd518e398a497d9c83327d22a4fc168388efae691
ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthrough

Clang warns:

sound/soc/qcom/qdsp6/topology.c:465:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                default:
                ^
sound/soc/qcom/qdsp6/topology.c:465:3: note: insert 'break;' to avoid fall-through
                default:
                ^
                break;
1 warning generated.

Clang is a little more pedantic than GCC, which permits implicit
fallthroughs to cases that contain just break or return. Clang's version
is more in line with the kernel's own stance in deprecated.rst, which
states that all switch/case blocks must end in either break,
fallthrough, continue, goto, or return. Add the missing break to fix
the warning.

Link: https://github.com/ClangBuiltLinux/linux/issues/1495
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211027190823.4057382-1-nathan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/topology.c