Skip to content

Commit 918c675

Browse files
Wang Liangkuba-moo
authored andcommitted
vxlan: remove redundant conversion of vni in vxlan_nl2conf
The IFLA_VXLAN_ID data has been converted to local variable vni in vxlan_nl2conf(), there is no need to do it again when set conf->vni. Signed-off-by: Wang Liang <[email protected]> Acked-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Petr Machata <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9a5bbab commit 918c675

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/vxlan/vxlan_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4041,7 +4041,7 @@ static int vxlan_nl2conf(struct nlattr *tb[], struct nlattr *data[],
40414041
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_ID], "Cannot change VNI");
40424042
return -EOPNOTSUPP;
40434043
}
4044-
conf->vni = cpu_to_be32(nla_get_u32(data[IFLA_VXLAN_ID]));
4044+
conf->vni = vni;
40454045
}
40464046

40474047
if (data[IFLA_VXLAN_GROUP]) {

0 commit comments

Comments
 (0)