Skip to content

Commit 41ced61

Browse files
JoePerchesdavem330
authored andcommitted
altera: Remove casts of pointer to same type
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 <[email protected]> Acked-by: Vince Bridgers <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 12f2a47 commit 41ced61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/altera/altera_tse_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ static int tse_change_mtu(struct net_device *dev, int new_mtu)
933933
static void altera_tse_set_mcfilter(struct net_device *dev)
934934
{
935935
struct altera_tse_private *priv = netdev_priv(dev);
936-
struct altera_tse_mac *mac = (struct altera_tse_mac *)priv->mac_dev;
936+
struct altera_tse_mac *mac = priv->mac_dev;
937937
int i;
938938
struct netdev_hw_addr *ha;
939939

@@ -963,7 +963,7 @@ static void altera_tse_set_mcfilter(struct net_device *dev)
963963
static void altera_tse_set_mcfilterall(struct net_device *dev)
964964
{
965965
struct altera_tse_private *priv = netdev_priv(dev);
966-
struct altera_tse_mac *mac = (struct altera_tse_mac *)priv->mac_dev;
966+
struct altera_tse_mac *mac = priv->mac_dev;
967967
int i;
968968

969969
/* set the hash filter */

0 commit comments

Comments
 (0)