]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: dsa: b53: avoid devlink resource IDs collision with PARENT_TOP
authorDavid Yang <mmyangfl@gmail.com>
Thu, 11 Jun 2026 07:08:48 +0000 (15:08 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 19:41:40 +0000 (12:41 -0700)
This might not cause real problems, but the b53 devlink resource ID
collides with the sentinel DEVLINK_RESOURCE_ID_PARENT_TOP (0). Avoid it
by keeping the real resource IDs starting at 1.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://patch.msgid.link/20260611070856.889700-3-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/b53/b53_common.c

index 06b8be8dc4db85f2e3c8616174f39727c8a4a2a4..3f5b9592794daca7c9c5e91303c764ba9e9721f4 100644 (file)
@@ -1225,6 +1225,7 @@ int b53_get_sset_count(struct dsa_switch *ds, int port, int sset)
 EXPORT_SYMBOL(b53_get_sset_count);
 
 enum b53_devlink_resource_id {
+       B53_DEVLINK_PARAM_ID_NONE,  /* DEVLINK_RESOURCE_ID_PARENT_TOP */
        B53_DEVLINK_PARAM_ID_VLAN_TABLE,
 };