mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-10-14 00:51:24 +02:00
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>
This commit is contained in:
parent
0d4b692c80
commit
9762fbeea4
@ -151,8 +151,8 @@ int show_board_info(void)
|
|||||||
if (!eth_env_get_enetaddr("ethaddr", ethaddr))
|
if (!eth_env_get_enetaddr("ethaddr", ethaddr))
|
||||||
eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
|
eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
|
||||||
|
|
||||||
#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR
|
if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR) &&
|
||||||
if (!eth_env_get_enetaddr("eth1addr", ethaddr)) {
|
!eth_env_get_enetaddr("eth1addr", ethaddr)) {
|
||||||
/*
|
/*
|
||||||
* Secondary MAC address is allocated from block
|
* Secondary MAC address is allocated from block
|
||||||
* 0x100000 higher then the first MAC address
|
* 0x100000 higher then the first MAC address
|
||||||
@ -161,7 +161,6 @@ int show_board_info(void)
|
|||||||
ethaddr[3] += 0x10;
|
ethaddr[3] += 0x10;
|
||||||
eth_env_set_enetaddr("eth1addr", ethaddr);
|
eth_env_set_enetaddr("eth1addr", ethaddr);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user