Re: [PATCH v3 4/4] net: mtip: The L2 switch driver for imx287
From: Andrew Lunn
Date: Wed Apr 02 2025 - 13:07:13 EST
> +struct switch_enet_private *mtip_netdev_get_priv(const struct net_device *ndev)
> +{
> + if (ndev->netdev_ops == &mtip_netdev_ops)
> + return netdev_priv(ndev);
> +
> + return NULL;
> +}
> +static bool mtip_port_dev_check(const struct net_device *ndev)
> +{
> + if (!mtip_netdev_get_priv(ndev))
> + return false;
> +
> + return true;
> +}
This appears to be the only use of mtip_netdev_get_priv(). It does not
care what priv actually is. In my previous review i said i think you
can simply this. I still think that is true.
Andrew