Revision | 9762fbeea451f4d81ec88788e7680e37a1ee5beb (tree) |
---|---|
Zeit | 2022-07-25 23:12:00 |
Autor | Francesco Dolcini <francesco.dolcini@tora...> |
Commiter | Stefano Babic |
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>
@@ -151,8 +151,8 @@ int show_board_info(void) | ||
151 | 151 | if (!eth_env_get_enetaddr("ethaddr", ethaddr)) |
152 | 152 | eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr); |
153 | 153 | |
154 | -#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR | |
155 | - if (!eth_env_get_enetaddr("eth1addr", ethaddr)) { | |
154 | + if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR) && | |
155 | + !eth_env_get_enetaddr("eth1addr", ethaddr)) { | |
156 | 156 | /* |
157 | 157 | * Secondary MAC address is allocated from block |
158 | 158 | * 0x100000 higher then the first MAC address |
@@ -161,7 +161,6 @@ int show_board_info(void) | ||
161 | 161 | ethaddr[3] += 0x10; |
162 | 162 | eth_env_set_enetaddr("eth1addr", ethaddr); |
163 | 163 | } |
164 | -#endif | |
165 | 164 | |
166 | 165 | return 0; |
167 | 166 | } |