From: Rosen Penev <rosenp@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Rafał Miłecki" <rafal@milecki.pl>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Srinivas Kandagatla" <srini@kernel.org>
Subject: [PATCH] nvmem: layouts: u-boot-env: remove ethaddr check
Date: Tue, 28 Apr 2026 14:26:21 -0700 [thread overview]
Message-ID: <20260428212621.60759-1-rosenp@gmail.com> (raw)
Manufacturers use various names for MAC addresses in u-boot.
Stuff like:
eth1addr
RADIOADDR0
RADIOADDR1
wmac1
wmac2
wanaddr
wlanmac
lanmac
wanmac
and many others. Don't restruct to just ethaddr in order to handle the
various names.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/nvmem/layouts/u-boot-env.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/nvmem/layouts/u-boot-env.c b/drivers/nvmem/layouts/u-boot-env.c
index f27f387bb52a..afa196be4161 100644
--- a/drivers/nvmem/layouts/u-boot-env.c
+++ b/drivers/nvmem/layouts/u-boot-env.c
@@ -75,11 +75,9 @@ static int u_boot_env_parse_cells(struct device *dev, struct nvmem_device *nvmem
info.offset = data_offset + value - data;
info.bytes = strlen(value);
info.np = of_get_child_by_name(dev->of_node, info.name);
- if (!strcmp(var, "ethaddr")) {
- info.raw_len = strlen(value);
- info.bytes = ETH_ALEN;
- info.read_post_process = u_boot_env_read_post_process_ethaddr;
- }
+ info.raw_len = strlen(value);
+ info.bytes = ETH_ALEN;
+ info.read_post_process = u_boot_env_read_post_process_ethaddr;
nvmem_add_one_cell(nvmem, &info);
}
--
2.54.0
next reply other threads:[~2026-04-28 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 21:26 Rosen Penev [this message]
2026-04-29 7:39 ` [PATCH] nvmem: layouts: u-boot-env: remove ethaddr check Miquel Raynal
2026-04-29 7:44 ` Miquel Raynal
2026-04-29 21:41 ` Rosen Penev
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=20260428212621.60759-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=rafal@milecki.pl \
--cc=srini@kernel.org \
/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