Re: [net-next PATCH v2 04/14] net: phy: Introduce fwnode_get_phy_id()
From: Andy Shevchenko <hidden>
Date: 2020-12-17 09:46:16
Also in:
linux-acpi, linux-arm-kernel, lkml
From: Andy Shevchenko <hidden>
Date: 2020-12-17 09:46:16
Also in:
linux-acpi, linux-arm-kernel, lkml
On Thu, Dec 17, 2020 at 10:28 AM Calvin Johnson [off-list ref] wrote:
On Tue, Dec 15, 2020 at 07:28:10PM +0200, Andy Shevchenko wrote:quoted
On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson [off-list ref] wrote:
...
quoted
quoted
+ if (sscanf(cp, "ethernet-phy-id%4x.%4x", &upper, &lower) == 2) {
quoted
*phy_id = ((upper & 0xFFFF) << 16) | (lower & 0xFFFF);
quoted
And perhaps GENMASK() ?Sure. Will rewrite accordingly.
Reading this again I'm now not sure these masks are needed at all. -- With Best Regards, Andy Shevchenko