Skip to contentSkip to conversation

r8169: Fix fall-through warning for Clang

PATCH In review Gustavo A. R. Silva 3 participants 3 messages May 28, 2021 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8169: Fix fall-through warning for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining warnings.

 drivers/net/ethernet/realtek/r8169_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/realtek/r8169_main.c +1 -0
index 1663e0486496..64f94a3fe646 100644
@@ -4115,6 +4115,7 @@ static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp,
 	case RTL_GIGA_MAC_VER_61:
 	case RTL_GIGA_MAC_VER_63:
 		padto = max_t(unsigned int, padto, ETH_ZLEN);
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

Quoted 8 lines

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining warnings.

 drivers/net/ethernet/realtek/r8169_main.c | 1 +
 1 file changed, 1 insertion(+)
#3 lore raw
In reply to a message not in the archive
Quoted 9 lines · On 5/28/21 17:30, [email protected] wrote:

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 4 lines · On Fri, 28 May 2021 15:23:27 -0500 you wrote:

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

Quoted 8 lines
Quoted 4 lines

[...]

Here is the summary with links:
- [next] r8169: Fix fall-through warning for Clang

    https://git.kernel.org/netdev/net-next/c/ffb35c679842

Awesome. :)

Thanks Heiner and Jakub.
--
Gustavo