]> git.dujemihanovic.xyz Git - u-boot.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)
commit5eee5ab91638c4482dd59ff511feefd3b15a2472
tree50d3b6425db68c3a5c923407238391b612f6c5f2
parentf4b712b840dd5fe0b984aadfe466c1886a31e906
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