* [PATCH] common: tlv: fix link error when CONFIG_NET is disabled
@ 2026-02-05 15:35 Ahmad Fatoum
2026-02-09 14:23 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-02-05 15:35 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum, 9l
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-09 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-05 15:35 [PATCH] common: tlv: fix link error when CONFIG_NET is disabled Ahmad Fatoum
2026-02-09 14:23 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox