From 6442bfb211cbc22cd83cd8c339e6d1835e9605a1 Mon Sep 17 00:00:00 2001 From: "Pratyush Yadav (Google)" Date: Sat, 1 Aug 2026 10:48:21 +0200 Subject: kho: add kho_radix_init_tree() Move the initialization logic of the radix tree into kho_radix_init_tree() instead of having users open-code it. Makes the boundaries cleaner and reduces code duplication when a new user of the radix tree will be added in a future commit. Signed-off-by: Pratyush Yadav (Google) Link: https://patch.msgid.link/20260801084833.1897543-13-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) --- include/linux/kho_radix_tree.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/kho_radix_tree.h b/include/linux/kho_radix_tree.h index b7532aff35d8..fcd69639721b 100644 --- a/include/linux/kho_radix_tree.h +++ b/include/linux/kho_radix_tree.h @@ -58,6 +58,7 @@ int kho_radix_add_key(struct kho_radix_tree *tree, unsigned long key); void kho_radix_del_key(struct kho_radix_tree *tree, unsigned long key); int kho_radix_walk_tree(struct kho_radix_tree *tree, const struct kho_radix_walk_cb *cb, void *data); +int kho_radix_init_tree(struct kho_radix_tree *tree, struct kho_radix_node *root); void kho_radix_destroy_tree(struct kho_radix_tree *tree); #else /* #ifdef CONFIG_KEXEC_HANDOVER */ @@ -76,6 +77,12 @@ static inline int kho_radix_walk_tree(struct kho_radix_tree *tree, return -EOPNOTSUPP; } +static inline int kho_radix_init_tree(struct kho_radix_tree *tree, + struct kho_radix_node *root) +{ + return 0; +} + static inline void kho_radix_destroy_tree(struct kho_radix_tree *tree) { } #endif /* #ifdef CONFIG_KEXEC_HANDOVER */ -- cgit v1.2.3