[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5DZ0a-5UGoSuwW4QOB7dNANNRVMaZpp=8Js_+7OrdKZAQ@mail.gmail.com>
Date: Tue, 20 Jul 2021 10:44:11 -0300
From: Fabio Estevam <festevam@...il.com>
To: Russell King <rmk+kernel@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>, Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next] net: phy: at803x: simplify custom phy id matching
Hi Russell,
On Tue, Jul 20, 2021 at 10:40 AM Russell King
<rmk+kernel@...linux.org.uk> wrote:
>
> The at803x driver contains a function, at803x_match_phy_id(), which
> tests whether the PHY ID matches the value passed, comparing phy_id
> with phydev->phy_id and testing all bits that in the driver's mask.
>
> This is the same test that is used to match the driver, with phy_id
> replaced with the driver specified ID, phydev->drv->phy_id.
>
> Hence, we already know the value of the bits being tested if we look
> at phydev->drv->phy_id directly, and we do not require a complicated
> test to check them. Test directly against phydev->drv->phy_id instead.
>
> Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
Yes, this makes it simpler:
Reviewed-by: Fabio Estevam <festevam@...il.com>
Powered by blists - more mailing lists