linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jbe@pengutronix.de
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	f.fainelli@gmail.com, kernel@pengutronix.de, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com
Subject: Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303
Date: Fri, 07 Apr 2017 06:35:53 -0700 (PDT)	[thread overview]
Message-ID: <20170407.063553.580195979968658177.davem@davemloft.net> (raw)
In-Reply-To: <20170407081502.30172-3-jbe@pengutronix.de>

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.

  reply	other threads:[~2017-04-07 13:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07  8:14 [PATCHv2] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis
2017-04-07  8:14 ` [PATCH v2 1/4] net: dsa: add support for the SMSC-LAN9303 tagging format Juergen Borleis
2017-04-07 13:06   ` Andrew Lunn
2017-04-10  7:18     ` Juergen Borleis
2017-04-10 13:15       ` Andrew Lunn
2017-04-07  8:15 ` [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 Juergen Borleis
2017-04-07 13:35   ` David Miller [this message]
2017-04-07 14:29   ` Andrew Lunn
2017-04-10  7:44     ` Juergen Borleis
2017-04-10 13:25       ` Andrew Lunn
2017-04-07  8:15 ` [PATCH v2 3/4] net: dsa: LAN9303: add I2C managed mode support Juergen Borleis
2017-04-07 13:40   ` Andrew Lunn
2017-04-10  7:58     ` Juergen Borleis
2017-04-07  8:15 ` [PATCH v2 4/4] net: dsa: LAN9303: add MDIO " Juergen Borleis
2017-04-07 14:19   ` Andrew Lunn
2017-04-07 14:27     ` David Miller
2017-04-07 14:54   ` Andrew Lunn
2017-04-07 15:05   ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170407.063553.580195979968658177.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=jbe@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).