RE: [PATCH net-next v4 3/5] net: stmmac: add xpcs function hooks into main driver and ethtool

From: Jose Abreu
Date: Wed May 29 2019 - 06:27:28 EST


From: Voon Weifeng <weifeng.voon@xxxxxxxxx>
Date: Wed, May 29, 2019 at 17:58:25

> +/**
> + * xPCS_interrupt - xPCS ISR
> + * @irq: interrupt number.
> + * @dev_id: to pass the net device pointer.
> + * Description: this is the xPCS interrupt service routine.
> + */

Please remove all JAVA docs from the series unless they are really
useful. This looks like it's stating the obvious and just pollutes the
eyes.

> +static irqreturn_t xpcs_interrupt(int irq, void *dev_id)
> +{
> + struct net_device *ndev = (struct net_device *)dev_id;
> + struct stmmac_priv *priv = netdev_priv(ndev);
> + irqreturn_t ret = IRQ_NONE;
> +
> + if (unlikely(!ndev)) {

This is a useless check because you already dereference the pointer when
you assign "priv" variable.

Thanks,
Jose Miguel Abreu