All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/2] net: phy: Make phy_interface_is_sgmii|rgmii a switch statement
@ 2023-04-14  4:24 Nishanth Menon
  2023-04-14  4:24 ` [PATCH V2 1/2] net: phy: Make phy_interface_is_sgmii " Nishanth Menon
  2023-04-14  4:24 ` [PATCH V2 2/2] net: phy: Make phy_interface_is_rgmii " Nishanth Menon
  0 siblings, 2 replies; 7+ messages in thread
From: Nishanth Menon @ 2023-04-14  4:24 UTC (permalink / raw)
  To: Marek Vasut, Tom Rini
  Cc: Siddharth Vadapalli, Vignesh Raghavendra, Michal Simek,
	Ramon Fried, u-boot, Marek Behún, Nishanth Menon

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 v1:
* Change in switch handling (Thanks Marek for the suggestion)

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

Nishanth Menon (2):
  net: phy: Make phy_interface_is_sgmii a switch statement
  net: phy: Make phy_interface_is_rgmii a switch statement

 include/phy.h | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

-- 
2.40.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-14 11:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14  4:24 [PATCH V2 0/2] net: phy: Make phy_interface_is_sgmii|rgmii a switch statement Nishanth Menon
2023-04-14  4:24 ` [PATCH V2 1/2] net: phy: Make phy_interface_is_sgmii " Nishanth Menon
2023-04-14  8:38   ` Marek Behún
2023-04-14 11:22   ` Marek Vasut
2023-04-14  4:24 ` [PATCH V2 2/2] net: phy: Make phy_interface_is_rgmii " Nishanth Menon
2023-04-14  8:39   ` Marek Behún
2023-04-14 11:21   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.