Skip to content
Commit 1d15e6a3 authored by Phil Elwell's avatar Phil Elwell
Browse files

fixup! Allow mac address to be set in smsc95xx



usbnet: smsc95xx: Fix indentation of smsc95xx_is_macaddr_param()

smsc95xx_is_macaddr_param() is incorrectly indented, it uses 7 spaces
instead of tabs.  Fix it.

Fixes: aac7b105 ("Allow mac address to be set in smsc95xx")
Signed-off-by: default avatarPhilipp Rosenberger <p.rosenberger@kunbus.com>
[lukas: fix netif_dbg() indentation as well, wordsmith commit message]
Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>

usbnet: smsc95xx: Simplify MAC address parsing

Parsing the MAC address provided on the kernel command line can be
simplified quite a bit by taking advantage of the kernel's built-in
mac_pton() helper.

Likewise emitting the MAC address can be simplified with the %pM
format string conversion.

Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>

usbnet: smsc95xx: Fix style issues in smsc95xx_is_macaddr_param()

It is bad practice to have a function named ..._is_...() which has side
effects.  So drop the 'is' from the name.

Per kernel convention return 0 on success and a negative errno on
failure.

Validate the MAC address retrieved from the command line.

Signed-off-by: default avatarPhilipp Rosenberger <p.rosenberger@kunbus.com>
[lukas: leave 2nd function parameter unchanged, wordsmith commit message]
Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
parent 6f4106f7
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