diff options
author | Francesco Dolcini <francesco.dolcini@toradex.com> | 2022-07-21 15:17:36 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2023-02-21 15:15:44 +0100 |
commit | a26ae29559d3456f8d92f705c5c798c39e0bc683 (patch) | |
tree | 88c583e48d4b1b97a1443e227300c9c4e12c2a1e /board | |
parent | 51fe743d71b232723c02146f85ecb948429df3ec (diff) |
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`.
Upstream-Status: Backport [9762fbeea451f4d81ec88788e7680e37a1ee5beb]
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/common/tdx-common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index bd42924058e..290de8add85 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; } |