[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220216154302.7g7kjbhfchuwzeef@skbuf>
Date: Wed, 16 Feb 2022 17:43:02 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH net-next 1/6] net: dsa: add support for phylink
mac_select_pcs()
On Wed, Feb 16, 2022 at 03:06:01PM +0000, Russell King (Oracle) wrote:
> diff --git a/net/dsa/port.c b/net/dsa/port.c
> index bd78192e0e47..1138d40f7897 100644
> --- a/net/dsa/port.c
> +++ b/net/dsa/port.c
> @@ -1011,6 +1011,20 @@ static void dsa_port_phylink_mac_pcs_get_state(struct phylink_config *config,
> }
> }
>
> +static struct phylink_pcs *dsa_port_phylink_mac_select_pcs(
> + struct phylink_config *config,
> + phy_interface_t interface)
Would be nice to align the arguments to the open parenthesis if possible:
static struct phylink_pcs *
dsa_port_phylink_mac_select_pcs(struct phylink_config *config,
phy_interface_t interface)
Same 3 lines consumed in both cases, but it's more in line to what was
done for other functions - dsa_slave_fdb_dump, dsa_slave_vlan_check_for_8021q_uppers,
dsa_find_designated_bridge_port_by_vid, etc.
> +{
> + struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
> + struct dsa_switch *ds = dp->ds;
> + struct phylink_pcs *pcs = NULL;
> +
> + if (ds->ops->phylink_mac_select_pcs)
> + pcs = ds->ops->phylink_mac_select_pcs(ds, dp->index, interface);
> +
> + return pcs;
> +}
Powered by blists - more mailing lists