From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Subject: [PATCH net-next v3 2/5] net: dsa: do not cast dst
Date: Thu, 1 Jun 2017 16:07:12 -0400 [thread overview]
Message-ID: <20170601200715.8438-3-vivien.didelot@savoirfairelinux.com> (raw)
In-Reply-To: <20170601200715.8438-1-vivien.didelot@savoirfairelinux.com>
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>
---
net/dsa/dsa2.c | 2 +-
net/dsa/legacy.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index c0a4576db4a2..21b44a9828f6 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -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;
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index ac4379b8d7ac..d70a1a788d17 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -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;
}
--
2.13.0
next prev parent reply other threads:[~2017-06-01 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 20:07 [PATCH net-next v3 0/5] net: dsa: tagger simplification Vivien Didelot
2017-06-01 20:07 ` [PATCH net-next v3 1/5] net: dsa: comment hot path requirements Vivien Didelot
2017-06-01 20:07 ` Vivien Didelot [this message]
2017-06-01 20:07 ` [PATCH net-next v3 3/5] net: dsa: remove dsa_uses_tagged_protocol Vivien Didelot
2017-06-01 20:07 ` [PATCH net-next v3 4/5] net: dsa: remove out_drop label in taggers rcv Vivien Didelot
2017-06-01 20:07 ` [PATCH net-next v3 5/5] net: dsa: factor skb freeing on xmit Vivien Didelot
2017-06-01 20:14 ` Florian Fainelli
2017-06-01 21:36 ` [PATCH net-next v3 0/5] net: dsa: tagger simplification David Miller
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=20170601200715.8438-3-vivien.didelot@savoirfairelinux.com \
--to=vivien.didelot@savoirfairelinux.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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
all inboxes | Powered by JetHome®