From: David Yang <mmyangfl@gmail.com>
To: netdev@vger.kernel.org
Cc: David Yang <mmyangfl@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Jonas Gorski <jonas.gorski@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Jiri Pirko <jiri@resnulli.us>, Simon Horman <horms@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 1/5] net: dsa: dsa_loop: avoid devlink resource IDs collision with PARENT_TOP
Date: Thu, 11 Jun 2026 15:08:47 +0800 [thread overview]
Message-ID: <20260611070856.889700-2-mmyangfl@gmail.com> (raw)
In-Reply-To: <20260611070856.889700-1-mmyangfl@gmail.com>
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>
---
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
next prev parent reply other threads:[~2026-06-11 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 7:08 [PATCH net-next v2 0/5] devlink: Warn on resource ID collision with PARENT_TOP David Yang
2026-06-11 7:08 ` David Yang [this message]
2026-06-11 7:08 ` [PATCH net-next v2 2/5] net: dsa: b53: avoid devlink resource IDs " David Yang
2026-06-11 7:08 ` [PATCH net-next v2 3/5] net: dsa: hellcreek: " David Yang
2026-06-11 7:39 ` Kurt Kanzenbach
2026-06-11 7:08 ` [PATCH net-next v2 4/5] net: dsa: mv88e6xxx: Avoid " David Yang
2026-06-11 7:08 ` [PATCH net-next v2 5/5] devlink: Warn on resource ID " David Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260611070856.889700-2-mmyangfl@gmail.com \
--to=mmyangfl@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox