Re: [PATCH 1/1] ar7: replace mac address parsing

2015-04-01 Thread Joe Perches
On Wed, 2015-04-01 at 14:17 +0200, Jonas Gorski wrote: > On Tue, Jun 24, 2014 at 9:26 PM, Florian Fainelli wrote: > > 2014-06-24 8:48 GMT-07:00 Joe Perches : > >> On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: > >>> Replace sscanf() with mac_pton(). > >> [] > >>> diff --git

Re: [PATCH 1/1] ar7: replace mac address parsing

2015-04-01 Thread Ralf Baechle
On Wed, Apr 01, 2015 at 02:17:16PM +0200, Jonas Gorski wrote: >for (i = 0; i < 6; i++) >dev_addr[i] = (char2hex(mac[i * 3]) << 4) + >char2hex(mac[i * 3 + 1]); > > > So I'm tempted to say it should not cause any issues. But my sample > size is

Re: [PATCH 1/1] ar7: replace mac address parsing

2015-04-01 Thread Jonas Gorski
On Tue, Jun 24, 2014 at 9:26 PM, Florian Fainelli wrote: > 2014-06-24 8:48 GMT-07:00 Joe Perches : >> On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: >>> Replace sscanf() with mac_pton(). >> [] >>> diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c >> [] >>> @@ -307,10

Re: [PATCH 1/1] ar7: replace mac address parsing

2015-04-01 Thread Jonas Gorski
On Tue, Jun 24, 2014 at 9:26 PM, Florian Fainelli flor...@openwrt.org wrote: 2014-06-24 8:48 GMT-07:00 Joe Perches j...@perches.com: On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: Replace sscanf() with mac_pton(). [] diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c

Re: [PATCH 1/1] ar7: replace mac address parsing

2015-04-01 Thread Ralf Baechle
On Wed, Apr 01, 2015 at 02:17:16PM +0200, Jonas Gorski wrote: for (i = 0; i 6; i++) dev_addr[i] = (char2hex(mac[i * 3]) 4) + char2hex(mac[i * 3 + 1]); So I'm tempted to say it should not cause any issues. But my sample size is rather small.

Re: [PATCH 1/1] ar7: replace mac address parsing

2015-04-01 Thread Joe Perches
On Wed, 2015-04-01 at 14:17 +0200, Jonas Gorski wrote: On Tue, Jun 24, 2014 at 9:26 PM, Florian Fainelli flor...@openwrt.org wrote: 2014-06-24 8:48 GMT-07:00 Joe Perches j...@perches.com: On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: Replace sscanf() with mac_pton(). [] diff

Re: [PATCH 1/1] ar7: replace mac address parsing

2014-06-24 Thread Florian Fainelli
2014-06-24 8:48 GMT-07:00 Joe Perches : > On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: >> Replace sscanf() with mac_pton(). > [] >> diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c > [] >> @@ -307,10 +307,7 @@ static void __init cpmac_get_mac(int instance, unsigned >>

Re: [PATCH 1/1] ar7: replace mac address parsing

2014-06-24 Thread Joe Perches
On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: > Replace sscanf() with mac_pton(). [] > diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c [] > @@ -307,10 +307,7 @@ static void __init cpmac_get_mac(int instance, unsigned > char *dev_addr) > } > > if (mac) { >

[PATCH 1/1] ar7: replace mac address parsing

2014-06-24 Thread Daniel Walter
Replace sscanf() with mac_pton(). Signed-off-by: Daniel Walter --- arch/mips/ar7/platform.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) --- diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 7e2356f..653cbff 100644 --- a/arch/mips/ar7/platform.c +++

[PATCH 1/1] ar7: replace mac address parsing

2014-06-24 Thread Daniel Walter
Replace sscanf() with mac_pton(). Signed-off-by: Daniel Walter dwal...@google.com --- arch/mips/ar7/platform.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) --- diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 7e2356f..653cbff 100644 ---

Re: [PATCH 1/1] ar7: replace mac address parsing

2014-06-24 Thread Joe Perches
On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: Replace sscanf() with mac_pton(). [] diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c [] @@ -307,10 +307,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) } if (mac) { -

Re: [PATCH 1/1] ar7: replace mac address parsing

2014-06-24 Thread Florian Fainelli
2014-06-24 8:48 GMT-07:00 Joe Perches j...@perches.com: On Tue, 2014-06-24 at 16:39 +0100, Daniel Walter wrote: Replace sscanf() with mac_pton(). [] diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c [] @@ -307,10 +307,7 @@ static void __init cpmac_get_mac(int instance,