From 5ddb7d1265633d855889831bcad0ee4b9ea4a0d3 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 27 Mar 2025 15:33:02 +0000 Subject: [PATCH] net: sun8i-emac: annotate fallthrough The Allwinner sun8i EMAC driver uses an implicit switch/case fallthrough when setting up the MAC/PHY communication protocol, to handle the case when RMII is requested, but would not be supported by the hardware. Add our "fallthrough;" statement-like macro before the default branch in sun8i_emac_set_syscon(), to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara --- drivers/net/sun8i_emac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 0da182d9f4c..8433e7db265 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -335,6 +335,7 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata, reg |= SC_RMII_EN | SC_ETCS_EXT_GMII; break; } + fallthrough; default: debug("%s: Invalid PHY interface\n", __func__); return -EINVAL; -- 2.39.5