public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [net-next] net: ethernet: adi: Fix invalid parent name length
@ 2022-09-21  7:16 Alexandru Tachici
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandru Tachici @ 2022-09-21  7:16 UTC (permalink / raw)


MII_BUS_ID_SIZE is larger than MAX_PHYS_ITEM_ID_LEN
so we use the former here to set the parent port id.

Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
---
 drivers/net/ethernet/adi/adin1110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
index 4dacb98e7e0a..4f3c372292f3 100644
--- a/drivers/net/ethernet/adi/adin1110.c
+++ b/drivers/net/ethernet/adi/adin1110.c
@@ -1028,7 +1028,7 @@ static int adin1110_port_get_port_parent_id(struct net_device *dev,
 	struct adin1110_port_priv *port_priv = netdev_priv(dev);
 	struct adin1110_priv *priv = port_priv->priv;
 
-	ppid->id_len = strnlen(priv->mii_bus_name, MII_BUS_ID_SIZE);
+	ppid->id_len = strnlen(priv->mii_bus_name, MAX_PHYS_ITEM_ID_LEN);
 	memcpy(ppid->id, priv->mii_bus_name, ppid->id_len);
 
 	return 0;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [net-next] net: ethernet: adi: Fix invalid parent name length
@ 2022-09-22  6:30 Alexandru Tachici
  2022-09-22 15:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandru Tachici @ 2022-09-22  6:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
	vegard.nossum, joel, l.stelmach

MII_BUS_ID_SIZE is larger than MAX_PHYS_ITEM_ID_LEN
so we use the former here to set the parent port id.

Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
---
 drivers/net/ethernet/adi/adin1110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
index 4dacb98e7e0a..4f3c372292f3 100644
--- a/drivers/net/ethernet/adi/adin1110.c
+++ b/drivers/net/ethernet/adi/adin1110.c
@@ -1028,7 +1028,7 @@ static int adin1110_port_get_port_parent_id(struct net_device *dev,
 	struct adin1110_port_priv *port_priv = netdev_priv(dev);
 	struct adin1110_priv *priv = port_priv->priv;
 
-	ppid->id_len = strnlen(priv->mii_bus_name, MII_BUS_ID_SIZE);
+	ppid->id_len = strnlen(priv->mii_bus_name, MAX_PHYS_ITEM_ID_LEN);
 	memcpy(ppid->id, priv->mii_bus_name, ppid->id_len);
 
 	return 0;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net-next] net: ethernet: adi: Fix invalid parent name length
  2022-09-22  6:30 [net-next] net: ethernet: adi: Fix invalid parent name length Alexandru Tachici
@ 2022-09-22 15:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-22 15:50 UTC (permalink / raw)
  To: Alexandru Tachici
  Cc: linux-kernel, andrew, hkallweit1, linux, davem, edumazet, kuba,
	pabeni, netdev, vegard.nossum, joel, l.stelmach

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 22 Sep 2022 09:30:49 +0300 you wrote:
> MII_BUS_ID_SIZE is larger than MAX_PHYS_ITEM_ID_LEN
> so we use the former here to set the parent port id.
> 
> Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
> Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
> ---
>  drivers/net/ethernet/adi/adin1110.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: ethernet: adi: Fix invalid parent name length
    https://git.kernel.org/netdev/net-next/c/2b9977470b39

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-22 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22  6:30 [net-next] net: ethernet: adi: Fix invalid parent name length Alexandru Tachici
2022-09-22 15:50 ` patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2022-09-21  7:16 Alexandru Tachici

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox