net: phy: Make phy_interface_is_sgmii|rgmii a switch statement
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 4 repliesIn review
- v12 patches 6 repliesSuperseded
Changes in v2 from the cover letter
* Change in switch handling (Thanks Marek for the suggestion)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net: phy: Make phy_interface_is_sgmii a switch statementinclude/ | +9 | 2 replies | |
| 2/2 | net: phy: Make phy_interface_is_rgmii a switch statementinclude/ | +9 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Marek Behún | Marek Vasut |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH V2 0/2] net: phy: Make phy_interface_is_sgmii|rgmii a switch statement
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/[email protected]/
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(-)
Signature · 1 line
2.40.0