[PATCH net-next v3] net: stmmac: dwmac-qcom-ethqos: Add support for 2.5G SGMII

Paolo Abeni pabeni at redhat.com
Thu Feb 1 04:45:18 PST 2024


On Tue, 2024-01-30 at 16:42 +0530, Sneh Shah wrote:
> @@ -608,17 +609,38 @@ static int ethqos_configure_sgmii(struct qcom_ethqos *ethqos)
>  {
>  	int val;
>  
> +	struct platform_device *pdev = ethqos->pdev;
> +	struct net_device *dev = platform_get_drvdata(pdev);
> +	struct stmmac_priv *priv = netdev_priv(dev);
>  	val = readl(ethqos->mac_base + MAC_CTRL_REG);

I'm unsure why checkpatch did not catch the above, but you need to
remove the empty line in-between the local variables declaration and
you must insert an empty line between the last definition and the first
statement.

Please also reorder the variables to respect the reverse x-mas tree
order, something alike:

	struct net_device *dev = platform_get_drvdata(ethqos->pdev);
	struct stmmac_priv *priv = netdev_priv(dev);
	int val;

	val = readl(ethqos->mac_base + MAC_CTRL_REG);

...

Cheers,

Paolo





More information about the linux-arm-kernel mailing list