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

Felix Maurer
2026-03-26T16:25:48Z

On Tue, Mar 24, 2026 at 03:46:25PM +0100, luka.gejak@linux.dev wrote:
> From: Luka Gejak <luka.gejak@linux.dev>
>
> 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@linux.dev>
> ---
> 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
>