Originally reported by Tom[1], turned out to be that recent commit
75d28899e3e9 ("net: phy: Synchronize PHY interface modes with Linux")
reordered the enum definitions which in turn broke the range checks.

we are left with two options:
a) check against explicit values to help reuse as much as possible and
let compiler optimize where applicable
or
b) be very explicit in phy drivers and drop these helpers.

I have chosen to go with (a) approach.

Tested on am64x, though the dp83867 is used elsewhere as well.

Changes since V2:
* Dropped fixing up sgmii api, instead: just fixup the phy driver, drop
  the api
* picked reviewed by for the rgmii

V2: https://lore.kernel.org/all/20230414042433.3436425-1...@ti.com/
V1: https://lore.kernel.org/all/20230413180713.2922524-1...@ti.com/

Nishanth Menon (3):
  net: phy: dp83867: Explicitly check against sgmii
  net: phy: Drop phy_interface_is_sgmii
  net: phy: Make phy_interface_is_rgmii a switch statement

 drivers/net/phy/dp83867.c |  2 +-
 include/phy.h             | 23 +++++++++--------------
 2 files changed, 10 insertions(+), 15 deletions(-)

-- 
2.40.0

Reply via email to