From: Francesco Dolcini Date: Thu, 21 Jul 2022 13:17:36 +0000 (+0200) Subject: toradex: common: Remove #ifdef usage for 2nd ethaddr X-Git-Tag: baikal/mips/sdk5.8.2~5^2~273^2~85 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=7f197003aba44fd59498459ef05ef2dd8d17fbff;p=uboot.git 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 --- diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 3643ebbb16..2284fcddb5 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; }