[PATCH net-next v7 1/8] net: stmmac: Introduce separate files for FPE implementation

Vladimir Oltean olteanv at gmail.com
Thu Oct 31 10:29:44 PDT 2024


On Thu, Oct 31, 2024 at 08:37:55PM +0800, Furong Xu wrote:
> +void stmmac_fpe_link_state_handle(struct stmmac_priv *priv, bool is_up)
> +{
> +	struct stmmac_fpe_cfg *fpe_cfg = &priv->fpe_cfg;
> +	unsigned long flags;
> +
> +	timer_shutdown_sync(&fpe_cfg->verify_timer);
> +
> +	spin_lock_irqsave(&fpe_cfg->lock, flags);
> +
> +	if (is_up && fpe_cfg->pmac_enabled) {
> +		/* VERIFY process requires pmac enabled when NIC comes up */
> +		stmmac_fpe_configure(priv, priv->ioaddr, fpe_cfg,
> +				     priv->plat->tx_queues_to_use,
> +				     priv->plat->rx_queues_to_use,
> +				     false, true);
> +
> +		/* New link => maybe new partner => new verification process */
> +		stmmac_fpe_apply(priv);
> +	} else {
> +		/* No link => turn off EFPE */
> +		stmmac_fpe_configure(priv, priv->ioaddr, fpe_cfg,
> +				     priv->plat->tx_queues_to_use,
> +				     priv->plat->rx_queues_to_use,
> +				     false, false);
> +	}
> +
> +	spin_unlock_irqrestore(&fpe_cfg->lock, flags);
> +}
> +
> +void stmmac_fpe_apply(struct stmmac_priv *priv)

This is absolutely minor, but could you please sort the functions in
their natural calling order (callee first, caller second)? It's fine now
that stmmac_fpe_apply() has its function prototype exported, and that
works as a forward declaration because we also include stmmac_fpe.h.
But if somebody were to unexport stmmac_fpe_apply() in the future, they
would also have to move it too.



More information about the linux-arm-kernel mailing list