[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170407.063553.580195979968658177.davem@davemloft.net>
Date: Fri, 07 Apr 2017 06:35:53 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jbe@...gutronix.de
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
f.fainelli@...il.com, kernel@...gutronix.de, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com
Subject: Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the
SMSC-LAN9303
From: Juergen Borleis <jbe@...gutronix.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.
Powered by blists - more mailing lists