net: phy: improve phy_resolve_aneg_linkmode
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 14 Feb 2019 21:15:31 +0000 (22:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 23:21:38 +0000 (15:21 -0800)
commita2703de7094211a77f458638289381b2955e0a5d
treee4160bfceb821a3b25fca1c6069deca0b6ac24fe
parent8b58d12f4ae1a10037b824b1fb409cf424d6aaac
net: phy: improve phy_resolve_aneg_linkmode

We have the settings array of modes which is sorted based on aneg
priority. Instead of checking each mode manually let's simply iterate
over the sorted settings.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-core.c