diff mbox series

ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthrough

Message ID 20211027190823.4057382-1-nathan@kernel.org (mailing list archive)
State Accepted
Commit c6c203bc4dfed6812cf77e7737074b9cff8dd78d
Headers show
Series ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthrough | expand

Commit Message

Nathan Chancellor Oct. 27, 2021, 7:08 p.m. UTC
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>
---
 sound/soc/qcom/qdsp6/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 1dcc81d95b910dc404c40ff6101bfa2520a3528e

Comments

Mark Brown Oct. 28, 2021, 12:59 p.m. UTC | #1
On Wed, 27 Oct 2021 12:08:23 -0700, Nathan Chancellor wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthrough
      commit: c6c203bc4dfed6812cf77e7737074b9cff8dd78d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index f31895379925..bd649c232a06 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -461,7 +461,7 @@  static struct audioreach_module *audioreach_parse_common_tokens(struct q6apm *ap
 			break;
 		case AR_TKN_U32_MODULE_DST_IN_PORT_ID:
 			dst_mod_ip_port_id = le32_to_cpu(mod_elem->value);
-
+			break;
 		default:
 			break;