[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4n+MnK6ZPMUIRhq@lunn.ch>
Date: Fri, 2 Dec 2022 14:31:30 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next] net: sfp: clean up i2c-bus property parsing
On Fri, Dec 02, 2022 at 10:20:52AM +0000, Russell King (Oracle) wrote:
> We currently have some complicated code in sfp_probe() which gets the
> I2C bus depending on whether the sfp node is DT or ACPI, and we use
> completely separate lookup functions.
>
> This could do with being in a separate function to make the code more
> readable, so move it to a new function, sfp_i2c_get(). We can also use
> fwnode_find_reference() to lookup the I2C bus fwnode before then
> decending into fwnode-type specific parsing.
>
> A future cleanup would be to move the fwnode-type specific parsing into
> the i2c layer, which is where it really should be.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists