From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>, 9l@9lo.re
Subject: [PATCH] common: tlv: fix link error when CONFIG_NET is disabled
Date: Thu, 5 Feb 2026 16:35:39 +0100 [thread overview]
Message-ID: <20260205153540.2900244-1-a.fatoum@pengutronix.de> (raw)
ethaddr_list and eth_of_get_fixup_node are used unconditionally in
of_tlv_fixup, but there is no dependency on CONFIG_NET for CONFIG_TLV.
Turn the ethernet-related fixup code into dead code if CONFIG_NET is
disabled and emit a warning to fix this.
Reported-by: 9l@9lo.re
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/tlv/parser.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/tlv/parser.c b/common/tlv/parser.c
index 7e1514758271..010e4cce38b0 100644
--- a/common/tlv/parser.c
+++ b/common/tlv/parser.c
@@ -187,6 +187,11 @@ int of_tlv_fixup(struct device_node *root, void *ctx)
if (!ethaddrs)
return 0;
+ if (!IS_ENABLED(CONFIG_NET)) {
+ pr_warn("CONFIG_NET disabled, so skipping ethernet-address trimming in fixup\n");
+ return 0;
+ }
+
list_for_each_entry(addr, ðaddr_list, list) {
char propname[sizeof("address-4294967295")];
const char *enetaddr_tlv_str;
--
2.47.3
next reply other threads:[~2026-02-05 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 15:35 Ahmad Fatoum [this message]
2026-02-09 14:23 ` Sascha Hauer
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=20260205153540.2900244-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=9l@9lo.re \
--cc=barebox@lists.infradead.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