OSDN Git Service

MIPS: Annotate fall-through in Cavium Octeon code
authorPaul Burton <paul.burton@mips.com>
Wed, 17 Jul 2019 20:12:23 +0000 (20:12 +0000)
committerPaul Burton <paul.burton@mips.com>
Thu, 18 Jul 2019 21:41:49 +0000 (14:41 -0700)
There's an intentional switch case fall-through in Cavium Octeon USB
code, which triggers compile errors with -Wimplicit-fallthrough due to
-Werror being enabled for arch/mips.

This can be encountered when building cavium_octeon_defconfig.

Fix the build issue by annotating the intentional fall-through.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
arch/mips/cavium-octeon/octeon-usb.c

index 1f730de..cc88a08 100644 (file)
@@ -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)