[PATCH net-next v2 1/5] net: dsa: dsa_loop: avoid devlink resource IDs collision with PARENT_TOP
From: David Yang
Date: Thu Jun 11 2026 - 03:10:04 EST
This might not cause real problems, but the dsa_loop 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@xxxxxxxxx>
---
drivers/net/dsa/dsa_loop.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c
index 7058faf23592..0e35e9841b9b 100644
--- a/drivers/net/dsa/dsa_loop.c
+++ b/drivers/net/dsa/dsa_loop.c
@@ -75,6 +75,7 @@ static struct phy_device *phydevs[PHY_MAX_ADDR];
static struct mdio_device *switch_mdiodev;
enum dsa_loop_devlink_resource_id {
+ DSA_LOOP_DEVLINK_PARAM_ID_NONE, /* DEVLINK_RESOURCE_ID_PARENT_TOP */
DSA_LOOP_DEVLINK_PARAM_ID_VTU,
};
--
2.53.0