From: Vladimir Oltean Date: Tue, 29 Nov 2022 14:12:17 +0000 (+0200) Subject: net: dpaa2-switch replace direct MAC access with dpaa2_switch_port_has_mac() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bc230671bfb25c2d3c225f674fe6c03cea88d22e;p=linux.git net: dpaa2-switch replace direct MAC access with dpaa2_switch_port_has_mac() The helper function will gain a lockdep annotation in a future patch. Make sure to benefit from it. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni --- diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c index 40ee57ef55beb..76a4b09e28543 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c @@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_stats(struct net_device *netdev, dpaa2_switch_ethtool_counters[i].name, err); } - if (port_priv->mac) + if (dpaa2_switch_port_has_mac(port_priv)) dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i); }