Messages in this thread | | | Date | Fri, 23 Sep 2022 11:24:35 +0200 | From | "Arnd Bergmann" <> | Subject | Re: [PATCH v2 3/3] ARM: orion5x: Add D-Link DNS-323 based on Device Tree |
| |
On Fri, Sep 23, 2022, at 11:13 AM, maukka@ext.kapsi.fi wrote: > On 23.9.2022 00:39, Arnd Bergmann wrote: >> Can you use simple_strntoull() to parse the address into a u64 instead? >> > Nice idea. Its current replacement seems to be kstrtoull().
Right.
> I'll have to do > it byte by byte, right? Or what do you have in mind with 64bit unsigned?
I misread your code and assumed it was stored as a 12-digit hexadecimal number, but you are right: with the colons you still need to iterate the bytes.
I looked a little further and found the mac_pton() function that I think does exactly what you need.
Arnd
| |