mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
Merge patch series "Remove <env.h> from <net.h>"
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
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
|
||||
#include <asm/cache.h>
|
||||
#include <command.h>
|
||||
#include <env.h>
|
||||
#include <hexdump.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/sizes.h>
|
||||
@@ -456,19 +455,6 @@ void net_process_received_packet(uchar *in_packet, int len);
|
||||
*/
|
||||
int update_tftp(ulong addr, char *interface, char *devstring);
|
||||
|
||||
/**
|
||||
* env_get_ip() - Convert an environment value to an ip address
|
||||
*
|
||||
* @var: Environment variable to convert. The value of this variable must be
|
||||
* in the format a.b.c.d, where each value is a decimal number from
|
||||
* 0 to 255
|
||||
* Return: IP address, or 0 if invalid
|
||||
*/
|
||||
static inline struct in_addr env_get_ip(char *var)
|
||||
{
|
||||
return string_to_ip(env_get(var));
|
||||
}
|
||||
|
||||
int net_init(void);
|
||||
|
||||
/* Called when a network operation fails to know if it should be re-tried */
|
||||
|
||||
Reference in New Issue
Block a user