• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision9762fbeea451f4d81ec88788e7680e37a1ee5beb (tree)
Zeit2022-07-25 23:12:00
AutorFrancesco Dolcini <francesco.dolcini@tora...>
CommiterStefano Babic

Log Message

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>

Ändern Zusammenfassung

Diff

--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -151,8 +151,8 @@ int show_board_info(void)
151151 if (!eth_env_get_enetaddr("ethaddr", ethaddr))
152152 eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
153153
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)) {
156156 /*
157157 * Secondary MAC address is allocated from block
158158 * 0x100000 higher then the first MAC address
@@ -161,7 +161,6 @@ int show_board_info(void)
161161 ethaddr[3] += 0x10;
162162 eth_env_set_enetaddr("eth1addr", ethaddr);
163163 }
164-#endif
165164
166165 return 0;
167166 }