Re: [PATCH net-next v1 2/7] net: hsr: replace fallthrough comments with fallthrough macro

From: Felix Maurer

Date: Thu Mar 26 2026 - 12:31:55 EST


On Tue, Mar 24, 2026 at 03:46:25PM +0100, luka.gejak@xxxxxxxxx wrote:
> From: Luka Gejak <luka.gejak@xxxxxxxxx>
>
> Replace two instances of the legacy '/* Fall through */' comment with the
> standardized 'fallthrough;' macro in hsr_get_node_status() and
> hsr_get_node_list(). The kernel has standardized on the fallthrough macro
> since the migration from comment-based annotations, which provides
> compiler-level verification of intentional case fall-throughs.

As the test robot message suggests: the fallthrough macro is only for
case statement blocks.

> Signed-off-by: Luka Gejak <luka.gejak@xxxxxxxxx>
> ---
> net/hsr/hsr_netlink.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
> index db0b0af7a692..32c1b77cf84b 100644
> --- a/net/hsr/hsr_netlink.c
> +++ b/net/hsr/hsr_netlink.c
> @@ -433,7 +433,7 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
>
> nla_put_failure:
> kfree_skb(skb_out);
> - /* Fall through */
> + fallthrough;
>
> fail:
> rcu_read_unlock();
> @@ -524,7 +524,7 @@ static int hsr_get_node_list(struct sk_buff *skb_in, struct genl_info *info)
>
> nla_put_failure:
> nlmsg_free(skb_out);
> - /* Fall through */
> + fallthrough;
>
> fail:
> rcu_read_unlock();
> --
> 2.53.0
>