Messages in this thread | | | Date | Fri, 07 Apr 2017 06:35:53 -0700 (PDT) | Subject | Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 | From | David Miller <> |
| |
From: Juergen Borleis <jbe@pengutronix.de> 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.
| |