git: 18aa2a81c465 - stable/14 - hhook: Sprinkle const qualifiers where appropriate
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Oct 2024 04:46:10 UTC
The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=18aa2a81c4651be2c7705f26f98175efa4f7a859 commit 18aa2a81c4651be2c7705f26f98175efa4f7a859 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-10-01 15:28:37 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-10-08 04:44:54 +0000 hhook: Sprinkle const qualifiers where appropriate No functional change intended. MFC after: 1 week (cherry picked from commit 941f8aceac1b6c16ca4d96b52e60ab437c4f9207) --- sys/kern/kern_hhook.c | 8 ++++---- sys/sys/hhook.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_hhook.c b/sys/kern/kern_hhook.c index f4ad16d99a12..432b889856ff 100644 --- a/sys/kern/kern_hhook.c +++ b/sys/kern/kern_hhook.c @@ -128,7 +128,7 @@ hhook_run_hooks(struct hhook_head *hhh, void *ctx_data, struct osd *hosd) * Register a new helper hook function with a helper hook point. */ int -hhook_add_hook(struct hhook_head *hhh, struct hookinfo *hki, uint32_t flags) +hhook_add_hook(struct hhook_head *hhh, const struct hookinfo *hki, uint32_t flags) { struct hhook *hhk, *tmp; int error; @@ -185,7 +185,7 @@ hhook_add_hook(struct hhook_head *hhh, struct hookinfo *hki, uint32_t flags) * struct in the array. */ int -hhook_add_hook_lookup(struct hookinfo *hki, uint32_t flags) +hhook_add_hook_lookup(const struct hookinfo *hki, uint32_t flags) { struct hhook_head **heads_to_hook, *hhh; int error, i, n_heads_to_hook; @@ -243,7 +243,7 @@ tryagain: * Remove a helper hook function from a helper hook point. */ int -hhook_remove_hook(struct hhook_head *hhh, struct hookinfo *hki) +hhook_remove_hook(struct hhook_head *hhh, const struct hookinfo *hki) { struct hhook *tmp; @@ -270,7 +270,7 @@ hhook_remove_hook(struct hhook_head *hhh, struct hookinfo *hki) * virtual instances of the hook point if it is virtualised). */ int -hhook_remove_hook_lookup(struct hookinfo *hki) +hhook_remove_hook_lookup(const struct hookinfo *hki) { struct hhook_head *hhh; diff --git a/sys/sys/hhook.h b/sys/sys/hhook.h index 084023ccb546..f83389fec2e3 100644 --- a/sys/sys/hhook.h +++ b/sys/sys/hhook.h @@ -107,14 +107,14 @@ struct hhook_head { /* Public KPI functions. */ void hhook_run_hooks(struct hhook_head *hhh, void *ctx_data, struct osd *hosd); -int hhook_add_hook(struct hhook_head *hhh, struct hookinfo *hki, +int hhook_add_hook(struct hhook_head *hhh, const struct hookinfo *hki, uint32_t flags); -int hhook_add_hook_lookup(struct hookinfo *hki, uint32_t flags); +int hhook_add_hook_lookup(const struct hookinfo *hki, uint32_t flags); -int hhook_remove_hook(struct hhook_head *hhh, struct hookinfo *hki); +int hhook_remove_hook(struct hhook_head *hhh, const struct hookinfo *hki); -int hhook_remove_hook_lookup(struct hookinfo *hki); +int hhook_remove_hook_lookup(const struct hookinfo *hki); int hhook_head_register(int32_t hhook_type, int32_t hhook_id, struct hhook_head **hhh, uint32_t flags);