[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191116.130207.18833339549640555.davem@davemloft.net>
Date: Sat, 16 Nov 2019 13:02:07 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: horatiu.vultur@...rochip.com
Cc: alexandre.belloni@...tlin.com, UNGLinuxDriver@...rochip.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net: mscc: ocelot: omit error check from
of_get_phy_mode
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
Date: Fri, 15 Nov 2019 11:11:15 +0100
> The commit 0c65b2b90d13c ("net: of_get_phy_mode: Change API to solve
> int/unit warnings") updated the function of_get_phy_mode declaration.
> Now it returns an error code and in case the node doesn't contain the
> property 'phy-mode' or 'phy-connection-type' it returns -EINVAL and would
> set the phy_interface_t to PHY_INTERFACE_MODE_NA.
>
> Ocelot VSC7514 has 4 internal phys which have the phy interface
> PHY_INTERFACE_MODE_NA. So because of_get_phy_mode would assign
> PHY_INTERFACE_MODE_NA to phy_mode when there is an error, there is no need
> to add the error check.
>
> Updates for v2:
> - drop error check because of_get_phy_mode already assigns phy_interface
> to PHY_INTERFACE_MODE in case of error.
>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
Applied, thank you.
Powered by blists - more mailing lists