net: dsa: do not cast dst
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 1 Jun 2017 20:07:12 +0000 (16:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 21:34:56 +0000 (17:34 -0400)
dsa_ptr is not a void pointer anymore since Nov 2011, as of cf50dcc24f82
("dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions"),
but an explicit dsa_switch_tree pointer, thus remove the (void *) cast.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c
net/dsa/legacy.c

index c0a4576db4a261815cb73ceb8a8eb9e4c6f8d482..21b44a9828f6b7f2c8a1d7f34002e6acfd0524b2 100644 (file)
@@ -454,7 +454,7 @@ static int dsa_dst_apply(struct dsa_switch_tree *dst)
         * sent to the tag format's receive function.
         */
        wmb();
-       dst->master_netdev->dsa_ptr = (void *)dst;
+       dst->master_netdev->dsa_ptr = dst;
        dst->applied = true;
 
        return 0;
index ac4379b8d7ac7d16aeb25847d2201b9d4f5696ab..d70a1a788d174724416572e499af1cc9ad515b7a 100644 (file)
@@ -651,7 +651,7 @@ static int dsa_setup_dst(struct dsa_switch_tree *dst, struct net_device *dev,
         * sent to the tag format's receive function.
         */
        wmb();
-       dev->dsa_ptr = (void *)dst;
+       dev->dsa_ptr = dst;
 
        return 0;
 }