Commit 823566ae authored by David Ahern's avatar David Ahern Committed by David S. Miller

net:mpls: Refactor mpls_netconf_notify_devconf to take event

Refactor mpls_netconf_notify_devconf to take the event as an input arg.
Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 23452170
...@@ -1040,8 +1040,8 @@ static int mpls_netconf_msgsize_devconf(int type) ...@@ -1040,8 +1040,8 @@ static int mpls_netconf_msgsize_devconf(int type)
return size; return size;
} }
static void mpls_netconf_notify_devconf(struct net *net, int type, static void mpls_netconf_notify_devconf(struct net *net, int event,
struct mpls_dev *mdev) int type, struct mpls_dev *mdev)
{ {
struct sk_buff *skb; struct sk_buff *skb;
int err = -ENOBUFS; int err = -ENOBUFS;
...@@ -1050,8 +1050,7 @@ static void mpls_netconf_notify_devconf(struct net *net, int type, ...@@ -1050,8 +1050,7 @@ static void mpls_netconf_notify_devconf(struct net *net, int type,
if (!skb) if (!skb)
goto errout; goto errout;
err = mpls_netconf_fill_devconf(skb, mdev, 0, 0, RTM_NEWNETCONF, err = mpls_netconf_fill_devconf(skb, mdev, 0, 0, event, 0, type);
0, type);
if (err < 0) { if (err < 0) {
/* -EMSGSIZE implies BUG in mpls_netconf_msgsize_devconf() */ /* -EMSGSIZE implies BUG in mpls_netconf_msgsize_devconf() */
WARN_ON(err == -EMSGSIZE); WARN_ON(err == -EMSGSIZE);
...@@ -1184,9 +1183,8 @@ static int mpls_conf_proc(struct ctl_table *ctl, int write, ...@@ -1184,9 +1183,8 @@ static int mpls_conf_proc(struct ctl_table *ctl, int write,
if (i == offsetof(struct mpls_dev, input_enabled) && if (i == offsetof(struct mpls_dev, input_enabled) &&
val != oval) { val != oval) {
mpls_netconf_notify_devconf(net, mpls_netconf_notify_devconf(net, RTM_NEWNETCONF,
NETCONFA_INPUT, NETCONFA_INPUT, mdev);
mdev);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment