diff options
| author | Pratyush Yadav (Google) <pratyush@kernel.org> | 2026-08-01 10:48:18 +0200 |
|---|---|---|
| committer | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-08-04 09:19:50 +0300 |
| commit | 8f1c8d4cf82c43be0e46bdfc68a707c6046bdf68 (patch) | |
| tree | 34828e3d05dbe67cfc009867492d8b1bb6b827e6 /include/linux | |
| parent | 88b2bdbbf7bcdc26410d32808a33f25a6c695759 (diff) | |
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 <pasha.tatashin@soleen.com>
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20260801084833.1897543-10-pratyush@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kho_radix_tree.h | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |
