From 8f1c8d4cf82c43be0e46bdfc68a707c6046bdf68 Mon Sep 17 00:00:00 2001 From: "Pratyush Yadav (Google)" Date: Sat, 1 Aug 2026 10:48:18 +0200 Subject: kho: add data argument to radix walk callback Add an opaque data pointer argument to kho_radix_walk_cb_t. This can be used by callers to pass extra information to the callback. Reviewed-by: Pasha Tatashin Signed-off-by: Pratyush Yadav (Google) Link: https://patch.msgid.link/20260801084833.1897543-10-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) --- include/linux/kho_radix_tree.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/kho_radix_tree.h b/include/linux/kho_radix_tree.h index 902bbeddcbb7..60c1246a9101 100644 --- a/include/linux/kho_radix_tree.h +++ b/include/linux/kho_radix_tree.h @@ -48,8 +48,8 @@ struct kho_radix_tree { * return value is directly returned to the caller. */ struct kho_radix_walk_cb { - int (*leaf)(unsigned long key); - int (*node)(phys_addr_t phys); + int (*leaf)(unsigned long key, void *data); + int (*node)(phys_addr_t phys, void *data); }; #ifdef CONFIG_KEXEC_HANDOVER @@ -57,7 +57,7 @@ struct kho_radix_walk_cb { 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); + const struct kho_radix_walk_cb *cb, void *data); #else /* #ifdef CONFIG_KEXEC_HANDOVER */ @@ -70,7 +70,7 @@ static inline void kho_radix_del_key(struct kho_radix_tree *tree, unsigned long key) { } static inline int kho_radix_walk_tree(struct kho_radix_tree *tree, - const struct kho_radix_walk_cb *cb) + const struct kho_radix_walk_cb *cb, void *data) { return -EOPNOTSUPP; } -- cgit v1.2.3