net: dsa: dsa_loop: avoid devlink resource IDs collision with PARENT_TOP

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@gmail.com>
Link: https://patch.msgid.link/20260611070856.889700-2-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
David Yang 2026-06-11 15:08:47 +08:00 committed by Jakub Kicinski
parent b712e0200f
commit b2772157e5

View File

@ -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,
};