* [PATCH] MIPS: OCTEON: octeon-usb: Mark expected switch fall-through
@ 2019-08-05 10:41 Guenter Roeck
2019-08-06 18:15 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2019-08-05 10:41 UTC (permalink / raw)
To: Paul Burton, James Hogan
Cc: Ralf Baechle, linux-mips, linux-kernel, Guenter Roeck,
Gustavo A . R . Silva
Since commit a035d552a93b ("Makefile: Globally enable fall-through
warning"), cavium_octeon_defconfig builds fail with
In file included from
arch/mips/cavium-octeon/octeon-usb.c:12:
arch/mips/cavium-octeon/octeon-usb.c: In function 'dwc3_octeon_clocks_start':
include/linux/device.h:1499:2: error: this statement may fall through
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/cavium-octeon/octeon-usb.c:399:3: note:
in expansion of macro 'dev_err'
dev_err(dev, "Invalid ref_clk %u, using 100000000 instead\n",
^~~~~~~
arch/mips/cavium-octeon/octeon-usb.c:401:2: note: here
case 100000000:
^~~~~~~
Mark the switch case to expect fall through.
Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
arch/mips/cavium-octeon/octeon-usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
index 1f730ded5224..8a16ab37aa11 100644
--- a/arch/mips/cavium-octeon/octeon-usb.c
+++ b/arch/mips/cavium-octeon/octeon-usb.c
@@ -398,6 +398,7 @@ static int dwc3_octeon_clocks_start(struct device *dev, u64 base)
default:
dev_err(dev, "Invalid ref_clk %u, using 100000000 instead\n",
clock_rate);
+ /* Fall through */
case 100000000:
mpll_mul = 0x19;
if (ref_clk_sel < 2)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: OCTEON: octeon-usb: Mark expected switch fall-through
2019-08-05 10:41 [PATCH] MIPS: OCTEON: octeon-usb: Mark expected switch fall-through Guenter Roeck
@ 2019-08-06 18:15 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-06 18:15 UTC (permalink / raw)
To: Guenter Roeck
Cc: Paul Burton, James Hogan, Ralf Baechle,
open list:BROADCOM NVRAM DRIVER, open list,
Gustavo A . R . Silva
On Mon, Aug 5, 2019 at 12:42 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Since commit a035d552a93b ("Makefile: Globally enable fall-through
> warning"), cavium_octeon_defconfig builds fail with
>
> In file included from
> arch/mips/cavium-octeon/octeon-usb.c:12:
> arch/mips/cavium-octeon/octeon-usb.c: In function 'dwc3_octeon_clocks_start':
> include/linux/device.h:1499:2: error: this statement may fall through
> _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/mips/cavium-octeon/octeon-usb.c:399:3: note:
> in expansion of macro 'dev_err'
> dev_err(dev, "Invalid ref_clk %u, using 100000000 instead\n",
> ^~~~~~~
> arch/mips/cavium-octeon/octeon-usb.c:401:2: note: here
> case 100000000:
> ^~~~~~~
>
> Mark the switch case to expect fall through.
>
> Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> arch/mips/cavium-octeon/octeon-usb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
> index 1f730ded5224..8a16ab37aa11 100644
> --- a/arch/mips/cavium-octeon/octeon-usb.c
> +++ b/arch/mips/cavium-octeon/octeon-usb.c
> @@ -398,6 +398,7 @@ static int dwc3_octeon_clocks_start(struct device *dev, u64 base)
> default:
> dev_err(dev, "Invalid ref_clk %u, using 100000000 instead\n",
> clock_rate);
> + /* Fall through */
> case 100000000:
> mpll_mul = 0x19;
> if (ref_clk_sel < 2)
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-06 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 10:41 [PATCH] MIPS: OCTEON: octeon-usb: Mark expected switch fall-through Guenter Roeck
2019-08-06 18:15 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).