Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

From: David Miller
Date: Fri Apr 07 2017 - 09:36:17 EST


From: Juergen Borleis <jbe@xxxxxxxxxxxxxx>
Date: Fri, 7 Apr 2017 10:15:00 +0200

> +static inline struct lan9303 *ds_to_lan9303(struct dsa_switch *ds)
> +{
> + return (struct lan9303 *)ds->priv;
> +}

You never need an explicit cast from a void pointer to another kind of
pointer. Please remove this.

In fact, this therefore makes the helper kind of useless and you can
just simply go:

struct lan9303_priv *priv = ds->priv;

everywhere.