From: Chen Ni <nichen@iscas.ac.cn>
To: roopa@nvidia.com, razor@blackwall.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: bridge@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Chen Ni <nichen@iscas.ac.cn>
Subject: [PATCH] net: bridge: remove unnecessary cast from netdev_priv()
Date: Mon, 15 Jul 2024 10:44:57 +0800 [thread overview]
Message-ID: <20240715024457.3743560-1-nichen@iscas.ac.cn> (raw)
Remove unnecessary cast of void * returned by netdev_priv().
Fixes: 928990631327 ("net: bridge: add notifications for the bridge dev on vlan change")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
net/bridge/br_netlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index f17dbac7d828..d02cc1497281 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -1085,7 +1085,7 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[],
int br_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags,
struct netlink_ext_ack *extack)
{
- struct net_bridge *br = (struct net_bridge *)netdev_priv(dev);
+ struct net_bridge *br = netdev_priv(dev);
struct nlattr *tb[IFLA_BRPORT_MAX + 1];
struct net_bridge_port *p;
struct nlattr *protinfo;
@@ -1143,7 +1143,7 @@ int br_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags,
/* Delete port information */
int br_dellink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
{
- struct net_bridge *br = (struct net_bridge *)netdev_priv(dev);
+ struct net_bridge *br = netdev_priv(dev);
struct net_bridge_port *p;
struct nlattr *afspec;
bool changed = false;
--
2.25.1
next reply other threads:[~2024-07-15 2:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 2:44 Chen Ni [this message]
2024-07-15 8:04 ` [PATCH] net: bridge: remove unnecessary cast from netdev_priv() Nikolay Aleksandrov
2024-07-16 13:30 ` Jiri Pirko
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=20240715024457.3743560-1-nichen@iscas.ac.cn \
--to=nichen@iscas.ac.cn \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.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