ASoC: ti: davinci-mcasp: Fix fall-through warning for Clang
Subsystems (3)
PATCH 1/1 ASoC: ti: davinci-mcasp: Fix fall-through warning for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a goto statement instead of letting the code fall through to the next case.
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining warnings.
sound/soc/ti/davinci-mcasp.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/ti/davinci-mcasp.c +1 -0
@@ -2317,6 +2317,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)break ;default :dev_err (&pdev->dev,"No DMA controller found (%d)\n" , ret); + goto err;case -EPROBE_DEFER : goto err; }
Signature · 1 line
2.27.0
Quoted 6 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a goto statement instead of letting the code fall through to the next case.
Signature · 1 line
Kees Cook
Quoted 19 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a goto statement instead of letting the code fall through to the next case.
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining warnings.sound/soc/ti/davinci-mcasp.c | 1 + 1 file changed, 1 insertion(+)sound/soc/ti/davinci-mcasp.c +0
-0
sound/soc/ti/davinci-mcasp.c static int davinci_mcasp_probe(struct platform_device *pdev) · line 2320
Quoted 4 lines
sound/soc/ti/davinci-mcasp.c +1
-0@@ -2317,6 +2317,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)break ;default :dev_err (&pdev->dev,"No DMA controller found (%d)\n" , ret); + goto err;
Would:
fallthrough;
be enough to silence the warning? If so, then I would prefer this version.
Quoted 4 lines
sound/soc/ti/davinci-mcasp.c +0
-0case -EPROBE_DEFER : goto err; }
Signature · 1 line
Péter
Quoted 28 lines · Péter Ujfalusi
Quoted 19 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a goto statement instead of letting the code fall through to the next case.
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining warnings.sound/soc/ti/davinci-mcasp.c | 1 + 1 file changed, 1 insertion(+)sound/soc/ti/davinci-mcasp.c +0
-0sound/soc/ti/davinci-mcasp.c static int davinci_mcasp_probe(struct platform_device *pdev) · line 2320
Quoted 4 lines
sound/soc/ti/davinci-mcasp.c +1
-0@@ -2317,6 +2317,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)break ;default :dev_err (&pdev->dev,"No DMA controller found (%d)\n" , ret); + goto err;Would:
Quoted 3 lines
fallthrough;be enough to silence the warning? If so, then I would prefer this version.
Yep.:) Done:
https://lore.kernel.org/linux-hardening/20210604072714.GA244640@embeddedor/
Thanks
--
Gustavo