Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: dsa: remove mac_prepare()/mac_finish() shims

No DSA driver makes use of the mac_prepare()/mac_finish() shimmed
operations anymore, so we can remove these.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/E1sByNx-00ELW1-Vp@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
bbb31b7a eebe71db

-40
-6
include/net/dsa.h
··· 882 882 struct phylink_pcs *(*phylink_mac_select_pcs)(struct dsa_switch *ds, 883 883 int port, 884 884 phy_interface_t iface); 885 - int (*phylink_mac_prepare)(struct dsa_switch *ds, int port, 886 - unsigned int mode, 887 - phy_interface_t interface); 888 885 void (*phylink_mac_config)(struct dsa_switch *ds, int port, 889 886 unsigned int mode, 890 887 const struct phylink_link_state *state); 891 - int (*phylink_mac_finish)(struct dsa_switch *ds, int port, 892 - unsigned int mode, 893 - phy_interface_t interface); 894 888 void (*phylink_mac_link_down)(struct dsa_switch *ds, int port, 895 889 unsigned int mode, 896 890 phy_interface_t interface);
-2
net/dsa/dsa.c
··· 1507 1507 1508 1508 if (ds->phylink_mac_ops) { 1509 1509 if (ds->ops->phylink_mac_select_pcs || 1510 - ds->ops->phylink_mac_prepare || 1511 1510 ds->ops->phylink_mac_config || 1512 - ds->ops->phylink_mac_finish || 1513 1511 ds->ops->phylink_mac_link_down || 1514 1512 ds->ops->phylink_mac_link_up) 1515 1513 return -EINVAL;
-32
net/dsa/port.c
··· 1549 1549 return pcs; 1550 1550 } 1551 1551 1552 - static int dsa_port_phylink_mac_prepare(struct phylink_config *config, 1553 - unsigned int mode, 1554 - phy_interface_t interface) 1555 - { 1556 - struct dsa_port *dp = dsa_phylink_to_port(config); 1557 - struct dsa_switch *ds = dp->ds; 1558 - int err = 0; 1559 - 1560 - if (ds->ops->phylink_mac_prepare) 1561 - err = ds->ops->phylink_mac_prepare(ds, dp->index, mode, 1562 - interface); 1563 - 1564 - return err; 1565 - } 1566 - 1567 1552 static void dsa_port_phylink_mac_config(struct phylink_config *config, 1568 1553 unsigned int mode, 1569 1554 const struct phylink_link_state *state) ··· 1560 1575 return; 1561 1576 1562 1577 ds->ops->phylink_mac_config(ds, dp->index, mode, state); 1563 - } 1564 - 1565 - static int dsa_port_phylink_mac_finish(struct phylink_config *config, 1566 - unsigned int mode, 1567 - phy_interface_t interface) 1568 - { 1569 - struct dsa_port *dp = dsa_phylink_to_port(config); 1570 - struct dsa_switch *ds = dp->ds; 1571 - int err = 0; 1572 - 1573 - if (ds->ops->phylink_mac_finish) 1574 - err = ds->ops->phylink_mac_finish(ds, dp->index, mode, 1575 - interface); 1576 - 1577 - return err; 1578 1578 } 1579 1579 1580 1580 static void dsa_port_phylink_mac_link_down(struct phylink_config *config, ··· 1594 1624 1595 1625 static const struct phylink_mac_ops dsa_port_phylink_mac_ops = { 1596 1626 .mac_select_pcs = dsa_port_phylink_mac_select_pcs, 1597 - .mac_prepare = dsa_port_phylink_mac_prepare, 1598 1627 .mac_config = dsa_port_phylink_mac_config, 1599 - .mac_finish = dsa_port_phylink_mac_finish, 1600 1628 .mac_link_down = dsa_port_phylink_mac_link_down, 1601 1629 .mac_link_up = dsa_port_phylink_mac_link_up, 1602 1630 };