net: dsa: realtek: Use %pM format specifier for MAC addresses
PATCH 1/1 net: dsa: realtek: Use %pM format specifier for MAC addresses
Convert to %pM instead of using custom code.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/net/dsa/realtek/rtl8366rb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/dsa/realtek/rtl8366rb.c +1 -2
@@ -573,8 +573,7 @@ static int rtl8366rb_set_addr(struct realtek_priv *priv)eth_random_addr (addr); -dev_info (priv->dev,"set MAC: %02X:%02X:%02X:%02X:%02X:%02X\n" , - addr[0 ], addr[1 ], addr[2 ], addr[3 ], addr[4 ], addr[5 ]); +dev_info (priv->dev,"set MAC: %pM\n" , addr); val = addr[0 ] <<8 | addr[1 ]; ret =regmap_write (priv->map,RTL8366RB_SMAR0 , val);if (ret)
Signature · 1 line
2.50.1
Quoted 3 lines · Andy Shevchenko
Convert to %pM instead of using custom code.
Signed-off-by Andy Shevchenko <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
Andrew
Quoted 21 lines · Andy Shevchenko
Convert to %pM instead of using custom code.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/net/dsa/realtek/rtl8366rb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/dsa/realtek/rtl8366rb.c +1
-2@@ -573,8 +573,7 @@ static int rtl8366rb_set_addr(struct realtek_priv *priv)eth_random_addr (addr); -dev_info (priv->dev,"set MAC: %02X:%02X:%02X:%02X:%02X:%02X\n" , - addr[0 ], addr[1 ], addr[2 ], addr[3 ], addr[4 ], addr[5 ]); +dev_info (priv->dev,"set MAC: %pM\n" , addr); val = addr[0 ] <<8 | addr[1 ]; ret =regmap_write (priv->map,RTL8366RB_SMAR0 , val);
Quoted 1 line
if (ret)
Reviewed-by Nicolai Buchwitz <[email protected]>
Thanks
Nicolai
Quoted 3 lines · Andy Shevchenko
Convert to %pM instead of using custom code.
Signed-off-by Andy Shevchenko <[email protected]>
Reviewed-by Linus Walleij <[email protected]>
Yours,
Linus Walleij
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Wed, 3 Jun 2026 13:20:11 +0200 you wrote:
Convert to %pM instead of using custom code.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/net/dsa/realtek/rtl8366rb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Here is the summary with links:
- [net-next,v1,1/1] net: dsa: realtek: Use %pM format specifier for MAC addresses
https://git.kernel.org/netdev/net-next/c/c1424df7ff82
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html