Thread (7 messages) 7 messages, 3 authors, 2025-09-04

Re: [PATCHv2 net-next 2/2] net: lan966x: convert fwnode to of

From: Rosen Penev <hidden>
Date: 2025-09-04 01:04:54

On Wed, Sep 3, 2025 at 4:55 PM Jakub Kicinski [off-list ref] wrote:
On Mon,  1 Sep 2025 13:20:01 -0700 Rosen Penev wrote:
quoted
This is a purely OF driver. There's no need for fwnode to handle any of
this, with the exception being phylik_create. Use of_fwnode_handle for
that.
Not sure this is worth cleaning up, but I'm not an OF API expert.
It's pretty odd that you're sneaking in an extra error check in
such a cleanup patch without even mentioning it.
git grep shows most drivers handling the error.

git grep of_get_phy_mode drivers/ | grep -v = | wc -l
7
git grep \ =\ of_get_phy_mode drivers/ | wc -l
48

I don't see why it should be different here.

Actually without handling the error, phy_mode gets used unassigned in
lan966x_probe_port

The fwnode API is different as it conflates int and phy_connection_t
as the same thing.
--
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help