aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorFrancesco Dolcini <francesco.dolcini@toradex.com>2022-07-21 15:17:36 +0200
committerStefano Babic <sbabic@denx.de>2022-07-25 16:12:00 +0200
commit9762fbeea451f4d81ec88788e7680e37a1ee5beb (patch)
treeb576f5ab1fb4bcce5d5ab22bc2cdf9d9e3fadc9a /board
parent0d4b692c807881253ec6954970ccbb0f717ae10a (diff)
downloadu-boot-9762fbeea451f4d81ec88788e7680e37a1ee5beb.zip
u-boot-9762fbeea451f4d81ec88788e7680e37a1ee5beb.tar.gz
u-boot-9762fbeea451f4d81ec88788e7680e37a1ee5beb.tar.bz2
toradex: common: Remove #ifdef usage for 2nd ethaddr
Fix checkpatch warn, use `IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR)` instead of `#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR`. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'board')
-rw-r--r--board/toradex/common/tdx-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index 3643ebb..2284fcd 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -151,8 +151,8 @@ int show_board_info(void)
if (!eth_env_get_enetaddr("ethaddr", ethaddr))
eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
-#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR
- if (!eth_env_get_enetaddr("eth1addr", ethaddr)) {
+ if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR) &&
+ !eth_env_get_enetaddr("eth1addr", ethaddr)) {
/*
* Secondary MAC address is allocated from block
* 0x100000 higher then the first MAC address
@@ -161,7 +161,6 @@ int show_board_info(void)
ethaddr[3] += 0x10;
eth_env_set_enetaddr("eth1addr", ethaddr);
}
-#endif
return 0;
}