2021-05-28 20:24:35

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH][next] 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.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
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(+)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 1663e0486496..64f94a3fe646 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -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;
}
--
2.27.0


2021-05-28 20:40:20

by Heiner Kallweit

[permalink] [raw]
Subject: Re: [PATCH][next] r8169: Fix fall-through warning for Clang

On 28.05.2021 22:23, Gustavo A. R. Silva 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.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> 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(+)
>

Acked-by: Heiner Kallweit <[email protected]>

2021-05-28 23:49:48

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH][next] r8169: Fix fall-through warning for Clang



On 5/28/21 17:30, [email protected] wrote:
> Hello:
>
> This patch was applied to netdev/net-next.git (refs/heads/master):
>
> 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.
>>
>> Link: https://github.com/KSPP/linux/issues/115
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>>
>> [...]
>
> 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