diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2020-03-29 14:05:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-30 11:17:34 -0700 |
commit | ba7d16c7794213b591a0ea415d975858d6a7dfd8 (patch) | |
tree | 1e4c5f45594a1bc3021684087a404f011fe56f38 /drivers/net/netdevsim | |
parent | c7f0d4c898cb2a3b39a33813739fe4f12ac325d8 (diff) | |
download | linux-ba7d16c7794213b591a0ea415d975858d6a7dfd8.tar.bz2 |
devlink: Implicitly set auto recover flag when registering health reporter
When health reporter is registered to devlink, devlink will implicitly set
auto recover if and only if the reporter has a recover method. No reason
to explicitly get the auto recover flag from the driver.
Remove this flag from all drivers that called
devlink_health_reporter_create.
All existing health reporters set auto recovery to true if they have a
recover method.
Yet, administrator can unset auto recover via netlink command as prior to
this patch.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r-- | drivers/net/netdevsim/health.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/health.c b/drivers/net/netdevsim/health.c index 9ff345d5524b..62958b238d50 100644 --- a/drivers/net/netdevsim/health.c +++ b/drivers/net/netdevsim/health.c @@ -271,14 +271,14 @@ int nsim_dev_health_init(struct nsim_dev *nsim_dev, struct devlink *devlink) health->empty_reporter = devlink_health_reporter_create(devlink, &nsim_dev_empty_reporter_ops, - 0, false, health); + 0, health); if (IS_ERR(health->empty_reporter)) return PTR_ERR(health->empty_reporter); health->dummy_reporter = devlink_health_reporter_create(devlink, &nsim_dev_dummy_reporter_ops, - 0, true, health); + 0, health); if (IS_ERR(health->dummy_reporter)) { err = PTR_ERR(health->dummy_reporter); goto err_empty_reporter_destroy; |