]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dsa: hellcreek: avoid devlink resource IDs collision with PARENT_TOP
authorDavid Yang <mmyangfl@gmail.com>
Thu, 11 Jun 2026 07:08:49 +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 hellcreek 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>
Acked-by: Kurt Kanzenbach <kurt@linutronix.de>
Link: https://patch.msgid.link/20260611070856.889700-4-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/hirschmann/hellcreek.h

index 851822adb09ead4d144db1774a9caf188d03a79d..b8b59f3b10e1fc737d94eb88b5386581a79bf161 100644 (file)
@@ -311,6 +311,7 @@ struct hellcreek {
 
 /* Devlink resources */
 enum hellcreek_devlink_resource_id {
+       HELLCREEK_DEVLINK_PARAM_ID_NONE,  /* DEVLINK_RESOURCE_ID_PARENT_TOP */
        HELLCREEK_DEVLINK_PARAM_ID_VLAN_TABLE,
        HELLCREEK_DEVLINK_PARAM_ID_FDB_TABLE,
 };