[PATCH net v3 1/3] net: dsa: motorcomm: Fix extack message on unsupported TC actions
From: David Yang
Date: Fri Nov 06 2026 - 02:39:57 EST
No extack reasons were given to unsupported TC actions. Set a reason on
the default path before falling back, and drop the now-redundant
initializer of `reason`, so the compiler warns on any future path that
uses it without assigning one.
Fixes: 8eb9e7520b17 ("net: dsa: yt921x: Add ACL support")
Signed-off-by: David Yang <mmyangfl@xxxxxxxxx>
---
drivers/net/dsa/motorcomm/tc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/motorcomm/tc.c b/drivers/net/dsa/motorcomm/tc.c
index 9dbd61e48fee..90b017a11a1b 100644
--- a/drivers/net/dsa/motorcomm/tc.c
+++ b/drivers/net/dsa/motorcomm/tc.c
@@ -1034,8 +1034,8 @@ yt921x_acl_rule_ext_parse_flow_action(struct yt921x_acl_rule_ext *ruleext,
const struct flow_action_entry *act;
u32 *action = ruleext->r.action;
bool seen_priority = false;
- const char *reason = NULL;
bool seen_police = false;
+ const char *reason;
unsigned int i;
int res;
@@ -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,
--
2.53.0