mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 21:04:14 +00:00
Shamelessly stealing wisdom from pasemi_mac.c, I found char2hex() could be replaced with a single call to sscanf(), looks cleaner to me at least. The result is 100 bytes trimmed off the size of a compiled cpmac_get_mac() and as an extra bonus it grumbles and gracefully fails over to using random_ether_addr() when an attempt to parse an invalid MAC address is made. Signed-off-by: Alexander Clouter <[email protected]> To: [email protected] Cc: [email protected] Signed-off-by: Ralf Baechle <[email protected]>