diff options
| author | David Yang <mmyangfl@gmail.com> | 2026-10-26 16:32:48 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-27 16:53:36 -0700 |
| commit | 5d7f3375cd574fc83f0cd30839b21455c0e79ae2 (patch) | |
| tree | b47f9d2bd680f23105c1f4eaf18367c215c8fb5c | |
| parent | 67ae1b80cf73f592b35e4b5e5001a24d6d6c8637 (diff) | |
net: dsa: motorcomm: Fix function parameter types
yt921x_fdb_add_index_in12() mistakenly takes the two register images
as u16, while all registers are 32-bit wide, silently losing the upper
half. Widen the parameters to u32.
Discoved by LLM but impacting existing registers.
Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20261026083252.12684-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/dsa/motorcomm/chip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c index d4fc20c52a58..33e5fc127244 100644 --- a/drivers/net/dsa/motorcomm/chip.c +++ b/drivers/net/dsa/motorcomm/chip.c @@ -679,8 +679,8 @@ yt921x_fdb_flush_port(struct yt921x_priv *priv, int port, bool flush_static) } static int -yt921x_fdb_add_index_in12(struct yt921x_priv *priv, u16 index, u16 ctrl1, - u16 ctrl2) +yt921x_fdb_add_index_in12(struct yt921x_priv *priv, u16 index, u32 ctrl1, + u32 ctrl2) { u32 ctrl; u32 val; |
