summaryrefslogtreecommitdiff
path: root/net/devlink/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/devlink/dev.c')
-rw-r--r--net/devlink/dev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/devlink/dev.c b/net/devlink/dev.c
index 57b2b8f03543..bcf001554e84 100644
--- a/net/devlink/dev.c
+++ b/net/devlink/dev.c
@@ -222,7 +222,7 @@ static void devlink_notify(struct devlink *devlink, enum devlink_command cmd)
int devlink_nl_get_doit(struct sk_buff *skb, struct genl_info *info)
{
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
struct sk_buff *msg;
int err;
@@ -519,7 +519,7 @@ free_msg:
int devlink_nl_reload_doit(struct sk_buff *skb, struct genl_info *info)
{
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
enum devlink_reload_action action;
enum devlink_reload_limit limit;
struct net *dest_net = NULL;
@@ -683,7 +683,7 @@ nla_put_failure:
int devlink_nl_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info)
{
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
struct sk_buff *msg;
int err;
@@ -704,7 +704,7 @@ int devlink_nl_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info)
int devlink_nl_eswitch_set_doit(struct sk_buff *skb, struct genl_info *info)
{
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
const struct devlink_ops *ops = devlink->ops;
enum devlink_eswitch_encap_mode encap_mode;
u8 inline_mode;
@@ -906,7 +906,7 @@ err_cancel_msg:
int devlink_nl_info_get_doit(struct sk_buff *skb, struct genl_info *info)
{
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
struct sk_buff *msg;
int err;
@@ -1134,7 +1134,7 @@ int devlink_nl_flash_update_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *nla_overwrite_mask, *nla_file_name;
struct devlink_flash_update_params params = {};
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
const char *file_name;
u32 supported_params;
int ret;
@@ -1302,7 +1302,7 @@ err_cancel_msg:
int devlink_nl_selftests_get_doit(struct sk_buff *skb, struct genl_info *info)
{
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
struct sk_buff *msg;
int err;
@@ -1372,7 +1372,7 @@ static const struct nla_policy devlink_selftest_nl_policy[DEVLINK_ATTR_SELFTEST_
int devlink_nl_selftests_run_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *tb[DEVLINK_ATTR_SELFTEST_ID_MAX + 1];
- struct devlink *devlink = info->user_ptr[0];
+ struct devlink *devlink = devlink_nl_ctx(info)->devlink;
struct nlattr *attrs, *selftests;
struct sk_buff *msg;
void *hdr;