]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Merge patch series "Remove <env.h> from <net.h>"
authorTom Rini <trini@konsulko.com>
Thu, 29 May 2025 14:31:07 +0000 (08:31 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 29 May 2025 14:31:07 +0000 (08:31 -0600)
Tom Rini <trini@konsulko.com> says:

Hey all,

This is a v3 of Simon's series[1] and depends on the series[2] I posted
the other day that removes <env.h> from <command.h>. With this series
done, I believe we've tackled all of the current cases of headers which
include <env.h> without directly needing it. Much of this series is in
fact Simon's v2 with the main differneces being:
- Removing <env.h> from <net.h> at the end
- Removing env_to_ip() given how little it's used rather than shuffling
  around where it's declared and un-inline'ing it. For a rarely used
  helper, this ends up being cleaner I think. Especially looking at some
  of the users (which called env_get repeatedly). If there's strong
  opinion here about using the other method[3] we can do that instead.
- Setting aside for now how to handle CMD_ELF=y and NO_NET=y because
  today it's actually fine as we unconditionally build lib/net_utils.c
  where string_to_ip() is defined. I'm unsure if a further series is
  warranted here or not. We rely on link-time optimization to keep code
  readable too.

[1]: https://lore.kernel.org/all/20250501010456.3930701-1-sjg@chromium.org
[2]: https://lore.kernel.org/all/20250514225002.15361-1-trini@konsulko.com
[3]: https://lore.kernel.org/all/20250501010456.3930701-23-sjg@chromium.org
Link: https://lore.kernel.org/r/20250515234154.1859366-1-trini@konsulko.com
1  2 
cmd/pxe.c
include/net-common.h
lib/efi_loader/efi_bootmgr.c
lib/efi_loader/efi_net.c
net/lwip/tftp.c
net/lwip/wget.c

diff --cc cmd/pxe.c
Simple merge
Simple merge
index 1a3461f5a9d03cbda1a18ce3123e3e1e1e526809,298149bcc3322a7d568a7ad50f968bb3fc35d883..b9437a81c642351ddc1da3b6e873b744e875ff54
@@@ -12,7 -12,7 +12,8 @@@
  #include <charset.h>
  #include <dm.h>
  #include <efi.h>
 +#include <efi_device_path.h>
+ #include <env.h>
  #include <log.h>
  #include <malloc.h>
  #include <net.h>
index 8e708d8d35077b72ea80e2dd6099b0a9181c613a,9db738ead9dd535a1fdeb574243bb51807ebdb74..86f0af9538c87d6a3bb230c9d2d905ba6f0eb635
@@@ -17,8 -17,8 +17,9 @@@
  
  #define LOG_CATEGORY LOGC_EFI
  
 +#include <efi_device_path.h>
  #include <efi_loader.h>
+ #include <env.h>
  #include <dm.h>
  #include <linux/sizes.h>
  #include <malloc.h>
diff --cc net/lwip/tftp.c
index fae701bad2eb3c667e8134341d1740a5531a0269,56d27f8212122eaa9c41c944b81ecb3ded58053f..b7eb486ef77cb10ef0fd1f326f6bf13a39b6b6e3
@@@ -6,9 -6,9 +6,10 @@@
  #include <display_options.h>
  #include <dm/device.h>
  #include <efi_loader.h>
+ #include <env.h>
  #include <image.h>
  #include <linux/delay.h>
 +#include <linux/kconfig.h>
  #include <lwip/apps/tftp_client.h>
  #include <lwip/timeouts.h>
  #include <mapmem.h>
diff --cc net/lwip/wget.c
index ea1113e18b113b4a407a2021a4a13170bcfcf5af,46c16edcc44033a6c8dac095bdf0befb4be326da..f4fd97182855aa3f018060ded9fdba0e8bef8fbe
@@@ -5,11 -5,10 +5,12 @@@
  #include <console.h>
  #include <display_options.h>
  #include <efi_loader.h>
+ #include <env.h>
  #include <image.h>
 +#include <linux/kconfig.h>
  #include <lwip/apps/http_client.h>
  #include "lwip/altcp_tls.h"
 +#include <lwip/errno.h>
  #include <lwip/timeouts.h>
  #include <rng.h>
  #include <mapmem.h>