[PATCH v3 4/4] net: mtip: The L2 switch driver for imx287
Andrew Lunn
andrew at lunn.ch
Wed Apr 2 10:06:37 PDT 2025
> +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
More information about the linux-arm-kernel
mailing list