Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3eb46a1d authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Grant Likely
Browse files

of_net: factor out repetitive code from of_get_mac_address()



of_get_mac_address() basically does the same  thing thrice, every  time with  a
different  property  name,  so it makes sense to factor out the repetitive code
into separate function. While at it, we can start using ETH_ALEN instead of the
bare number and drop unnecessary parens around the property length check.

The resulting ARM object file is 100 bytes less in size than before the patch.

Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
parent a5ed1ad0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment