[PATCH] ARM: mach-orion5x: Use hex2bin that is present in kernel lib
Lennert Buytenhek
buytenh at wantstofly.org
Thu Nov 24 01:40:18 EST 2011
On Wed, Nov 23, 2011 at 04:26:57PM +0200, plaes at plaes.org wrote:
> Hey!
Hello!
> I noticed there was some duplicate code under arm/mach-orion5x directory
> so I ended up with a patch that uses existing library function present
> in kernel code.
>
> I regretfully have to admit that this patch is NOT even compile-tested,
> but I hope that it still useful in case it happens to break something...
>
> [...]
>
> for (i = 0; i < 6; i++) {
> - int byte;
> -
> - byte = dns323_parse_hex_byte(mac_page + (i * 3));
> - if (byte < 0) {
> + if (hex2bin(addr[i], mac_page + (i * 3), 2))
> goto error_fail;
I don't think that this does what you think it does...
thanks,
Lennert
More information about the linux-arm-kernel
mailing list