Skip to content

Remove <env.h> from <net.h>

Tom Rini u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest22 patches 6 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22net: Remove env_get_ip helper() functioncmd/elf.c cmd/net.c drivers/net/netconsole.c +2 more+9 -210 replies
2/22congatec: Include env.h to permit reading the environmentboard/congatec/cgtqmx8/cgtqmx8.c+1 -00 replies
3/22dhelectronics: Include env.h to permit reading the environmentboard/dhelectronics/common/dh_common.c+1 -00 replies
4/22imx8ulp_evk: Include env.h to permit reading the environmentboard/freescale/imx8ulp_evk/imx8ulp_evk.c+1 -00 replies
5/22net: Include string.h in net-legacy.hinclude/net-legacy.h+1 -00 replies
6/22venice: Include env.h to permit reading the environmentboard/gateworks/venice/venice.c+1 -00 replies
7/22phytec: Include env.h to permit reading the environmentboard/phytec/common/phytec_som_detection_blocks.c+1 -00 replies
8/22ronetix: Include env.h to permit reading the environmentboard/ronetix/imx8mq-cm/imx8mq_cm.c+1 -00 replies
9/22toradex: Include env.h to permit reading the environmentboard/toradex/colibri_imx7/colibri_imx7.c board/toradex/verdin-imx8mm/verdin-imx8mm.c+2 -10 replies
10/22advantech: Include env.h in imx8qm_dmsse20_a1board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c+1 -00 replies
11/22tegra: Include env.h to permit reading the environmentarch/arm/mach-tegra/dt-setup.c+1 -00 replies
12/22synology: Include env.h to permit reading the environmentboard/Synology/ds414/ds414.c+1 -00 replies
13/22amlogic: Include env.h to permit reading the environmentboard/amlogic/jethub-j100/jethub-j100.c+1 -00 replies
14/22freescale: Include env.h to permit reading the environmentboard/freescale/mx7dsabresd/mx7dsabresd.c+1 -00 replies
15/22google: Include env.h to permit reading the environmentboard/google/chameleonv3/board.c+2 -00 replies
16/22liebherr: Include env.h to permit reading the environmentboard/liebherr/xea/xea.c+1 -01 reply
17/22technexion: Include env.h to permit reading the environmentboard/technexion/pico-imx7d/pico-imx7d.c+1 -00 replies
18/22net: Include byteorder in net6.hinclude/net6.h+1 -00 replies
19/22net: Include env.h in pcap.cnet/pcap.c+1 -00 replies
20/22net: dc2114x: Include env.h to permit reading the environmentdrivers/net/dc2114x.c+1 -00 replies
21/22global: Avoid indirect inclusion of <env.h> from <net.h>board/BuR/brppt2/board.c board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c board/andestech/ae350/ae350.c +19 more+22 -04 replies
22/22include/net.h: Drop <env.h>include/net-common.h+0 -10 replies

Reviews trailers per patch

6 of 22 patches have a Reviewed-by or Acked-by.

PatchJerome ForissierOliver GrauteStefan RoeseTony DinhViacheslav BocharovLukasz MajewskiMartyn WelchWolfgang WallnerIlias Apalodimas
1/22
2/22
3/22
4/22
5/22R-b
6/22
7/22
8/22
9/22
10/22A-b
11/22
12/22R-b R-b
13/22R-b
14/22
15/22
16/22R-b R-b
17/22
18/22
19/22
20/22
21/22R-b R-b R-b A-b
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 9 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/22] Remove <env.h> from <net.h>

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/[email protected]
[2]: https://lore.kernel.org/all/[email protected]
[3]: https://lore.kernel.org/all/[email protected]

Signature · 1 line
Tom