devlink: remove devlink_dump_for_each_instance_get() helper
authorJiri Pirko <jiri@nvidia.com>
Wed, 18 Jan 2023 15:21:14 +0000 (16:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Jan 2023 03:08:38 +0000 (19:08 -0800)
commit543753d9e22e3943e2c31c4b5241afafb55dd52a
tree946a7f59849742f5cf476bc76e477d8a2e2069b1
parent19be51a93d9986edcfecae010920ab1d5714479b
devlink: remove devlink_dump_for_each_instance_get() helper

devlink_dump_for_each_instance_get() is currently called from
a single place in netlink.c. As there is no need to use
this helper anywhere else in the future, remove it and
call devlinks_xa_find_get() directly from while loop
in devlink_nl_instance_iter_dump(). Also remove redundant
idx clear on loop end as it is already done
in devlink_nl_instance_iter_dump().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/devl_internal.h
net/devlink/netlink.c