arm: stm32mp: cleanup test on eth_env_set_enetaddr result
Subsystems (3)
PATCH 1/1 arm: stm32mp: cleanup test on eth_env_set_enetaddr result
Remove the unnecessary inversion on the eth_env_set_enetaddr() result which only make complex the code of setup_mac_address() and display an invalid value in the associated pr_err.
---
arch/arm/mach-stm32mp/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/cpu.c +2 -2
@@ -491,8 +491,8 @@ __weak int setup_mac_address(void) return -EINVAL; }pr_debug ("OTP MAC address = %pM\n" , enetaddr); - ret = !eth_env_set_enetaddr ("ethaddr" , enetaddr); -if (!ret) + ret =eth_env_set_enetaddr ("ethaddr" , enetaddr); +if (ret)pr_err ("Failed to set mac address %pM from OTP: %d\n" , enetaddr, ret);#endif
Signature · 1 line
2.17.1
PATCH 1/1 arm: stm32mp: cleanup test on eth_env_set_enetaddr result
Quoted 5 lines · Patrick Delaunay
Remove the unnecessary inversion on the
eth_env_set_enetaddr()result which only make complex the code ofsetup_mac_address()and display an invalid value in the associatedpr_err.Signed-off-by Patrick Delaunay <[email protected]>
PATCH 1/1 arm: stm32mp: cleanup test on eth_env_set_enetaddr result
Hi
Quoted 7 lines · Marek Vasut
Quoted 5 lines · Patrick Delaunay
Remove the unnecessary inversion on the
eth_env_set_enetaddr()result which only make complex the code ofsetup_mac_address()and display an invalid value in the associatedpr_err.Signed-off-by Patrick Delaunay <[email protected]>Reviewed-by Marek Vasut <[email protected]>
Applied to u-boot-stm/next
Thanks
Patrice