1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

net: Drop #ifdefs with CONFIG_BOOTP_SERVERIP

Use IS_ENABLED() instead, to reduce the number of build paths.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
Simon Glass
2021-12-18 11:27:52 -07:00
committed by Tom Rini
parent d3877fba31
commit 434075393d
3 changed files with 16 additions and 17 deletions

View File

@@ -302,12 +302,12 @@ void net_auto_load(void)
if (s != NULL && strcmp(s, "NFS") == 0) {
if (net_check_prereq(NFS)) {
/* We aren't expecting to get a serverip, so just accept the assigned IP */
#ifdef CONFIG_BOOTP_SERVERIP
net_set_state(NETLOOP_SUCCESS);
#else
printf("Cannot autoload with NFS\n");
net_set_state(NETLOOP_FAIL);
#endif
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
net_set_state(NETLOOP_SUCCESS);
} else {
printf("Cannot autoload with NFS\n");
net_set_state(NETLOOP_FAIL);
}
return;
}
/*
@@ -327,12 +327,12 @@ void net_auto_load(void)
}
if (net_check_prereq(TFTPGET)) {
/* We aren't expecting to get a serverip, so just accept the assigned IP */
#ifdef CONFIG_BOOTP_SERVERIP
net_set_state(NETLOOP_SUCCESS);
#else
printf("Cannot autoload with TFTPGET\n");
net_set_state(NETLOOP_FAIL);
#endif
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
net_set_state(NETLOOP_SUCCESS);
} else {
printf("Cannot autoload with TFTPGET\n");
net_set_state(NETLOOP_FAIL);
}
return;
}
tftp_start(TFTPGET);