Skip to contentSkip to conversation

MIPS: Annotate fall-throughs in Cavium Octeon code

PATCH Applied Paul Burton 1 participant 2 messages Jul 17, 2019 – Jul 18, 2019 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Annotate fall-throughs in Cavium Octeon code

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.

---

 arch/mips/cavium-octeon/executive/cvmx-pko.c | 2 +-
 arch/mips/cavium-octeon/octeon-usb.c         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/cavium-octeon/executive/cvmx-pko.c +1 -1
index 676fab50dd2b..c2a97b62742b 100644
@@ -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",
arch/mips/cavium-octeon/octeon-usb.c +1 -0
index 1f730ded5224..cc88a08bc1f7 100644
@@ -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)
Signature · 1 line
2.22.0
author Applied
#1 lore raw

Hello,

Quoted 9 lines · 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.

Applied to mips-fixes.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]