summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/netdevsim.h
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2018-03-30 09:28:51 -0700
committerDavid S. Miller <davem@davemloft.net>2018-03-31 22:22:10 -0400
commitef817102586cca428d6fe0803cc232a3c929141f (patch)
tree1d5332f50fa0b68efc2b950b4bd834eb4cf1b156 /drivers/net/netdevsim/netdevsim.h
parent6851cf28db1c4becc25a2906ecd080c0022a9f11 (diff)
downloadlwn-ef817102586cca428d6fe0803cc232a3c929141f.tar.gz
lwn-ef817102586cca428d6fe0803cc232a3c929141f.zip
netdevsim: Change nsim_devlink_setup to return error to caller
Change nsim_devlink_setup to return any error back to the caller and update nsim_init to handle it. Requested-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
-rw-r--r--drivers/net/netdevsim/netdevsim.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index afb8cf90c0fd..3a8581af3b85 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -117,7 +117,7 @@ enum nsim_resource_id {
NSIM_RESOURCE_IPV6_FIB_RULES,
};
-void nsim_devlink_setup(struct netdevsim *ns);
+int nsim_devlink_setup(struct netdevsim *ns);
void nsim_devlink_teardown(struct netdevsim *ns);
int nsim_devlink_init(void);
@@ -128,8 +128,9 @@ void nsim_fib_exit(void);
u64 nsim_fib_get_val(struct net *net, enum nsim_resource_id res_id, bool max);
int nsim_fib_set_max(struct net *net, enum nsim_resource_id res_id, u64 val);
#else
-static inline void nsim_devlink_setup(struct netdevsim *ns)
+static inline int nsim_devlink_setup(struct netdevsim *ns)
{
+ return 0;
}
static inline void nsim_devlink_teardown(struct netdevsim *ns)