* [PATCH] ARM: mach-orion5x: Use hex2bin that is present in kernel lib
@ 2011-11-23 14:26 plaes at plaes.org
2011-11-24 6:40 ` Lennert Buytenhek
0 siblings, 1 reply; 3+ messages in thread
From: plaes at plaes.org @ 2011-11-23 14:26 UTC (permalink / raw)
To: linux-arm-kernel
Hey!
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...
P?ikest,
Priit ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-mach-orion5x-Use-hex2bin-that-is-present-in-kern.patch
Type: text/x-patch
Size: 3160 bytes
Desc:
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111123/fc6de17f/attachment.bin>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: mach-orion5x: Use hex2bin that is present in kernel lib
2011-11-23 14:26 [PATCH] ARM: mach-orion5x: Use hex2bin that is present in kernel lib plaes at plaes.org
@ 2011-11-24 6:40 ` Lennert Buytenhek
2011-11-24 9:49 ` plaes at plaes.org
0 siblings, 1 reply; 3+ messages in thread
From: Lennert Buytenhek @ 2011-11-24 6:40 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: mach-orion5x: Use hex2bin that is present in kernel lib
2011-11-24 6:40 ` Lennert Buytenhek
@ 2011-11-24 9:49 ` plaes at plaes.org
0 siblings, 0 replies; 3+ messages in thread
From: plaes at plaes.org @ 2011-11-24 9:49 UTC (permalink / raw)
To: linux-arm-kernel
?hel kenal p?eval, N, 2011-11-24 kell 07:40, kirjutas Lennert Buytenhek:
> On Wed, Nov 23, 2011 at 04:26:57PM +0200, plaes at plaes.org wrote:
>
[...]
> >
> > [...]
> >
> > 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...
Indeed. I assume that it didn't even compile. I have fixed the two
issues I found in the previous patch and tweaked the printk output for
TS-x09. Run-tested with similar code on x86 so now I'm confident enough
to sign it off ;)
P?ikest,
Priit Laes ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-mach-orion5x-Use-hex2bin-that-is-present-in-kern.patch
Type: text/x-patch
Size: 3353 bytes
Desc:
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111124/e786a30b/attachment.bin>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-24 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 14:26 [PATCH] ARM: mach-orion5x: Use hex2bin that is present in kernel lib plaes at plaes.org
2011-11-24 6:40 ` Lennert Buytenhek
2011-11-24 9:49 ` plaes at plaes.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).