summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshok Reddy Soma <[email protected]>2022-02-23 15:00:58 +0100
committerMichal Simek <[email protected]>2022-03-07 08:48:21 +0100
commitff8ee707fb0b5aab49832dd124a3c8cc9b3e5d41 (patch)
tree4079499beef94068481fa61e6edb16d8b81b2388
parent90e8f2db60a1e49526f053876925741682da96ab (diff)
xilinx: common: Optimise updating ethaddr from eeprom
In board_late_init_xilinx() eth*addr are updated from the values read from eeprom. Ideally the MAC addresses are updated sequencially. So if any MAC address is invalid, it means there are no further valid values. So optimise this logic by replacing continue with break. Signed-off-by: Ashok Reddy Soma <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/efef0d07add5d5777396ea111ad75411dc402db3.1645624855.git.michal.simek@xilinx.com
-rw-r--r--board/xilinx/common/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 0068cb87926..db089c4a0b1 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -416,7 +416,7 @@ int board_late_init_xilinx(void)
for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) {
if (!desc->mac_addr[i])
- continue;
+ break;
if (is_valid_ethaddr((const u8 *)desc->mac_addr[i]))
ret |= eth_env_set_enetaddr_by_index("eth",