diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-05-26 13:28:40 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-05-30 20:32:20 +0300 |
commit | 216ba9f4adc8f2e452edb9a58d2dfbfc11608c00 (patch) | |
tree | 047ff2829d2e6fda1d1c4efcbdb2278636794b31 /net/devlink | |
parent | 216aa67f3e981a0cfb0a7c3b0d4c107823ef6c56 (diff) | |
download | linux-216ba9f4adc8f2e452edb9a58d2dfbfc11608c00.tar.xz |
devlink: move port_del() to devlink_port_ops
Move port_del() from devlink_ops into newly introduced devlink_port_ops.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/devlink')
-rw-r--r-- | net/devlink/leftover.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c index 36acaa6a6f18..404313128cfb 100644 --- a/net/devlink/leftover.c +++ b/net/devlink/leftover.c @@ -1348,7 +1348,7 @@ static int devlink_nl_cmd_port_new_doit(struct sk_buff *skb, struct devlink_port_new_attrs new_attrs = {}; struct devlink *devlink = info->user_ptr[0]; - if (!devlink->ops->port_new || !devlink->ops->port_del) + if (!devlink->ops->port_new) return -EOPNOTSUPP; if (!info->attrs[DEVLINK_ATTR_PORT_FLAVOUR] || @@ -1387,10 +1387,10 @@ static int devlink_nl_cmd_port_del_doit(struct sk_buff *skb, struct netlink_ext_ack *extack = info->extack; struct devlink *devlink = info->user_ptr[0]; - if (!devlink->ops->port_del) + if (!devlink_port->ops->port_del) return -EOPNOTSUPP; - return devlink->ops->port_del(devlink, devlink_port, extack); + return devlink_port->ops->port_del(devlink, devlink_port, extack); } static int |