lkml.org 
[lkml]   [2021]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next v9 03/15] net: phy: Introduce phy related fwnode functions
On Fri, Jun 11, 2021 at 2:08 PM Russell King (Oracle)
<linux@armlinux.org.uk> wrote:
>
> On Fri, Jun 11, 2021 at 01:40:59PM +0200, Rafael J. Wysocki wrote:
> > I'm not sure why you want the above to be two if () statements instead of one?
> >
> > I would change the ordering anyway, that is
> >
> > if (!IS_ERR(phy_node) || is_acpi_node(fwnode))
> > return phy_node;
> >
> > And I think that the is_acpi_node() check is there to return the error
> > code right away so as to avoid returning a "not found" error later.
> >
> > But I'm not sure if this is really necessary. Namely, if nothing
> > depends on the specific error code returned by this function, it would
> > be somewhat cleaner to let the code below run if phy_node is an error
> > pointer in the ACPI case, because in that case the code below will
> > produce an error pointer anyway.
>
> However, that opens the door to someone shipping "working" ACPI with
> one of these names that we've taken the decision not to support on
> ACPI firmware. Surely, it's much better that we don't accept the
> legacy names so we don't allow such configurations to work.

Fair enough.

\
 
 \ /
  Last update: 2021-06-11 14:33    [W:1.596 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site