[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFr9PXnME5UCyOdkRGFO2+=gv27grcq35Adrtio3ex4hq0CWEQ@mail.gmail.com>
Date: Wed, 2 Dec 2020 18:10:43 +0900
From: Daniel Palmer <daniel@...f.com>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc: DTML <devicetree@...r.kernel.org>, SoC Team <soc@...nel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
olof@...om.net, Arnd Bergmann <arnd@...db.de>,
Rob Herring <robh@...nel.org>, Willy Tarreau <w@....eu>
Subject: Re: [PATCH v2 10/10] ARM: mstar: SMP support
Hi Russell,
On Wed, 2 Dec 2020 at 00:04, Russell King - ARM Linux admin
<linux@...linux.org.uk> wrote:
>
> On Tue, Dec 01, 2020 at 10:43:30PM +0900, Daniel Palmer wrote:
> > + np = of_find_compatible_node(NULL, NULL, "mstar,smpctrl");
> > + smpctrl = of_iomap(np, 0);
> > +
> > + if (!smpctrl)
> > + return -ENODEV;
>
> Wouldn't -ENOMEM be more appropriate here?
There seems to be examples of both -ENOMEM and -ENODEV in other ARM platforms.
arch/arm/mach-aspeed/platsmp.c uses -ENODEV for example.
I went with -ENODEV there as the source of the error is most likely
the node not being in the device tree.
I didn't check the result of of_find_compatible_node() because for the
memory barrier code in the same file I was told it wasn't necessary.
Thanks,
Daniel
Powered by blists - more mailing lists