Re: [PATCH net 1/4] net: dsa: motorcomm: Fix extack message on unsupported TC actions
From: Andrew Lunn
Date: Thu Nov 05 2026 - 17:22:28 EST
On Mon, Nov 02, 2026 at 03:11:13PM +0800, David Yang wrote:
> No extack reasons were given to unsupported TC actions. Fix it.
>
> Fixes: 8eb9e7520b17 ("net: dsa: yt921x: Add ACL support")
> Signed-off-by: David Yang <mmyangfl@xxxxxxxxx>
> ---
> drivers/net/dsa/motorcomm/tc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/dsa/motorcomm/tc.c b/drivers/net/dsa/motorcomm/tc.c
> index 9dbd61e48fee..8835907366bf 100644
> --- a/drivers/net/dsa/motorcomm/tc.c
> +++ b/drivers/net/dsa/motorcomm/tc.c
> @@ -1122,6 +1122,7 @@ yt921x_acl_rule_ext_parse_flow_action(struct yt921x_acl_rule_ext *ruleext,
> break;
> }
> default:
> + reason = "Unsupported by HW";
> fallback:
> if (cls->common.skip_sw) {
> NL_SET_ERR_MSG_FMT_MOD(extack,
Maybe also change:
const char *reason = NULL;
to
const char *reason;
That way, the compiler is likely to warn you if reason is used but not
set.
Andrew