netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: netdev@vger.kernel.org
Cc: nios2-dev@lists.rocketboards.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 1/7] altera: Remove casts of pointer to same type
Date: Mon, 24 Mar 2014 13:15:34 -0700	[thread overview]
Message-ID: <b3437e88a3d02c3ee8b9378b5801471a38cf24c5.1395692043.git.joe@perches.com> (raw)
In-Reply-To: <cover.1395692043.git.joe@perches.com>

Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.

Done via coccinelle script:

$ cat typecast_2.cocci
@@
type T;
T *foo;
@@

-	(T *)foo
+	foo

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ethernet/altera/altera_tse_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index 6006ef2..c70a29e 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -933,7 +933,7 @@ static int tse_change_mtu(struct net_device *dev, int new_mtu)
 static void altera_tse_set_mcfilter(struct net_device *dev)
 {
 	struct altera_tse_private *priv = netdev_priv(dev);
-	struct altera_tse_mac *mac = (struct altera_tse_mac *)priv->mac_dev;
+	struct altera_tse_mac *mac = priv->mac_dev;
 	int i;
 	struct netdev_hw_addr *ha;
 
@@ -963,7 +963,7 @@ static void altera_tse_set_mcfilter(struct net_device *dev)
 static void altera_tse_set_mcfilterall(struct net_device *dev)
 {
 	struct altera_tse_private *priv = netdev_priv(dev);
-	struct altera_tse_mac *mac = (struct altera_tse_mac *)priv->mac_dev;
+	struct altera_tse_mac *mac = priv->mac_dev;
 	int i;
 
 	/* set the hash filter */
-- 
1.8.1.2.459.gbcd45b4.dirty

  reply	other threads:[~2014-03-24 20:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 20:15 [PATCH net-next 0/7] drivers/net: Remove pointer casts to same type Joe Perches
2014-03-24 20:15 ` Joe Perches [this message]
2014-03-24 23:36   ` [PATCH net-next 1/7] altera: Remove casts of pointer " Vince Bridgers
2014-03-26 19:47   ` David Miller
2014-03-24 20:15 ` [PATCH net-next 2/7] alx: " Joe Perches
2014-03-26 19:47   ` David Miller
2014-03-24 20:15 ` [PATCH net-next 3/7] intel: " Joe Perches
2014-03-24 20:20   ` Jeff Kirsher
2014-03-24 20:15 ` [PATCH net-next 4/7] qlcnic: " Joe Perches
2014-03-25  5:50   ` Shahed Shaikh
2014-03-26 19:47   ` David Miller
2014-03-24 20:15 ` [PATCH net-next 5/7] carl9170: " Joe Perches
2014-03-24 20:15 ` [PATCH net-next 6/7] mwifiex: " Joe Perches
2014-03-24 22:23   ` Bing Zhao
2014-03-24 20:15 ` [PATCH net-next 7/7] rtlwifi: " Joe Perches

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=b3437e88a3d02c3ee8b9378b5801471a38cf24c5.1395692043.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nios2-dev@lists.rocketboards.org \
    /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).