]> git.baikalelectronics.ru Git - uboot.git/commit
net: dsa: refactor the code to set the port MAC address into a dedicated function
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 24 Aug 2021 12:00:40 +0000 (15:00 +0300)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 28 Sep 2021 15:50:55 +0000 (18:50 +0300)
commit42607b6427f3b1b121615a7c7b41c4af42adc26e
tree50d3b6425db68c3a5c923407238391b612f6c5f2
parentd2a31d955e847d56aee09bd7aa31b85bf4b352e7
net: dsa: refactor the code to set the port MAC address into a dedicated function

This snippet of code has a bothering "if (...) return 0" in it which
assumes it is the last piece of code running in dsa_port_probe().

This makes it difficult to add further code at the end of dsa_port_probe()
which does not depend on MAC address stuff.

So move the code to a dedicated function which returns void and let the
code flow through.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Michael Walle <michael@walle.cc>
net/dsa-uclass.c