From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/1] um: vector: Use %pM format specifier for MAC addresses
Date: Wed, 3 Jun 2026 09:29:58 +0200 [thread overview]
Message-ID: <20260603072958.107215-1-andriy.shevchenko@linux.intel.com> (raw)
Convert to %pM instead of using custom code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/um/drivers/vector_kern.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 2cc90055499a..e09c9db4f4a7 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1557,13 +1557,16 @@ static void vector_setup_etheraddr(struct net_device *dev, char *str)
"Attempt to assign an invalid ethernet address to a device disallowed\n");
goto random;
}
+
+ eth_hw_addr_set(dev, addr);
+
if (!is_local_ether_addr(addr)) {
+ addr[0] |= 0x02;
netdev_warn(dev, "Warning: Assigning a globally valid ethernet address to a device\n");
netdev_warn(dev, "You should set the 2nd rightmost bit in the first byte of the MAC,\n");
- netdev_warn(dev, "i.e. %02x:%02x:%02x:%02x:%02x:%02x\n",
- addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], addr[5]);
+ netdev_warn(dev, "i.e. %pM\n", addr);
}
- eth_hw_addr_set(dev, addr);
+
return;
random:
--
2.50.1
reply other threads:[~2026-06-03 7:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260603072958.107215-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
/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