diff mbox series

net: bridge: remove unnecessary cast from netdev_priv()

Message ID 20240715024457.3743560-1-nichen@iscas.ac.cn (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: bridge: remove unnecessary cast from netdev_priv() | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 816 this patch: 816
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 821 this patch: 821
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 821 this patch: 821
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-15--06-00 (tests: 695)

Commit Message

Chen Ni July 15, 2024, 2:44 a.m. UTC
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(-)

Comments

Nikolay Aleksandrov July 15, 2024, 8:04 a.m. UTC | #1
On 15/07/2024 05:44, Chen Ni wrote:
> 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
This is not a fix, the code isn't broken and it doesn't violate
anything.

Nacked-by: Nikolay Aleksandrov <razor@blackwall.org>
Jiri Pirko July 16, 2024, 1:30 p.m. UTC | #2
Mon, Jul 15, 2024 at 10:04:26AM CEST, razor@blackwall.org wrote:
>On 15/07/2024 05:44, Chen Ni wrote:
>> 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
>This is not a fix, the code isn't broken and it doesn't violate
>anything.

Yeah, it's cosmetics, send it to net-next without "Fixes" tag.

>
>Nacked-by: Nikolay Aleksandrov <razor@blackwall.org>
>
>
diff mbox series

Patch

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;