linux-mips
[Top] [All Lists]

Re: [PATCH v2] arch/mips rb532: replace mac_addr parsing

To: Daniel Walter <dwalter@google.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH v2] arch/mips rb532: replace mac_addr parsing
From: James Hogan <james.hogan@imgtec.com>
Date: Tue, 24 Jun 2014 11:13:33 +0100
Cc: <linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>
In-reply-to: <20140624084540.GA22930@google.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20140624084540.GA22930@google.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
Hi Daniel,

On 24/06/14 09:45, Daniel Walter wrote:
> @@ -333,7 +311,13 @@ static int __init plat_setup_devices(void)
>  static int __init setup_kmac(char *s)
>  {
>       printk(KERN_INFO "korina mac = %s\n", s);
> -     parse_mac_addr(s);
> +     sscanf(s, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
> +                     &korina_dev0_data.mac[0],
> +                     &korina_dev0_data.mac[1],
> +                     &korina_dev0_data.mac[2],
> +                     &korina_dev0_data.mac[3],
> +                     &korina_dev0_data.mac[4],
> +                     &korina_dev0_data.mac[5]);

Does it make sense to go one better and use mac_pton() for this?

Cheers
James

<Prev in Thread] Current Thread [Next in Thread>