linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Annotate fall-throughs in Cavium Octeon code
@ 2019-07-17 20:12 Paul Burton
  2019-07-18 20:52 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Burton @ 2019-07-17 20:12 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

There are a couple of intentional switch case fall-throughs in Cavium
Octeon code, which trigger compile errors with -Wimplicit-fallthrough
due to -Werror being enabled for arch/mips.

These can be encountered when building cavium_octeon_defconfig.

Fix the build issues by annotating the intentional fall-throughs.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/cavium-octeon/executive/cvmx-pko.c | 2 +-
 arch/mips/cavium-octeon/octeon-usb.c         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-pko.c b/arch/mips/cavium-octeon/executive/cvmx-pko.c
index 676fab50dd2b..c2a97b62742b 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-pko.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-pko.c
@@ -485,11 +485,11 @@ cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, uint64_t base_queue,
 			config.s.qos_mask = 0xff;
 			break;
 		case CVMX_PKO_QUEUE_STATIC_PRIORITY:
-			/* Pass 1 will fall through to the error case */
 			if (!cvmx_octeon_is_pass1()) {
 				config.s.qos_mask = 0xff;
 				break;
 			}
+			/* fall through - pass 1 hits the error case */
 		default:
 			cvmx_dprintf("ERROR: cvmx_pko_config_port: Invalid "
 				     "priority %llu\n",
diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
index 1f730ded5224..cc88a08bc1f7 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.22.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Annotate fall-throughs in Cavium Octeon code
  2019-07-17 20:12 [PATCH] MIPS: Annotate fall-throughs in Cavium Octeon code Paul Burton
@ 2019-07-18 20:52 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-07-18 20:52 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Paul Burton, linux-mips

Hello,

Paul Burton wrote:
> There are a couple of intentional switch case fall-throughs in Cavium
> Octeon code, which trigger compile errors with -Wimplicit-fallthrough
> due to -Werror being enabled for arch/mips.
> 
> These can be encountered when building cavium_octeon_defconfig.
> 
> Fix the build issues by annotating the intentional fall-throughs.
> 
> Signed-off-by: Paul Burton <paul.burton@mips.com>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-18 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 20:12 [PATCH] MIPS: Annotate fall-throughs in Cavium Octeon code Paul Burton
2019-07-18 20:52 ` Paul Burton

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).