From: Guenter Roeck <linux@roeck-us.net>
To: Paul Burton <paul.burton@mips.com>, James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>,
"Gustavo A . R . Silva" <gustavo@embeddedor.com>
Subject: [PATCH] MIPS: OCTEON: octeon-usb: Mark expected switch fall-through
Date: Mon, 5 Aug 2019 03:41:55 -0700 [thread overview]
Message-ID: <1565001715-22966-1-git-send-email-linux@roeck-us.net> (raw)
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
next reply other threads:[~2019-08-05 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 10:41 Guenter Roeck [this message]
2019-08-06 18:15 ` [PATCH] MIPS: OCTEON: octeon-usb: Mark expected switch fall-through Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1565001715-22966-1-git-send-email-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=gustavo@embeddedor.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).