From nobody Tue Oct 08 10:09:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XNBZS1ZVCz5ZFbm; Tue, 08 Oct 2024 10:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XNBZS0FHnz4MFM; Tue, 8 Oct 2024 10:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728382160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9QTPxcWgae/+c8zGdoiKh9VD5Poy/KAZMDpOV4tIQ0=; b=dmhqZKHc5toi6TaknBNlucTOmjTAyFghI721sD50/YFQvvheXzLE8Xw3edYFpBt6PzzP3H yPFhcERz9dQMhNvJa6rRv+Ev0yZURZi/89k8YVFS61tW+5E7BZNIGO4+gK62Ri0HPc+ZHL tZm7eYdyiHZX3Y6FhC9uwWjIfuNRSaAhUeljflcemam92rVVcUuzsq3gf5VPRYZW4Ah0Wh 2epttlxIhBctps3AsB6yF2P4+SxtxdxPelCl8tdTe9fOrQGOAJfgtl6nEVyE/5FojFQwN2 cflCAHKr0UJieQOnSiQvjUwuGMBvmij5T/Lqml59jeiKtphg7DL8TbLgf+3/eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728382160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9QTPxcWgae/+c8zGdoiKh9VD5Poy/KAZMDpOV4tIQ0=; b=XvqA2oAtMBT9Y6SXtpTR0JdpgVBiUudOee5IW2ZC16CZvKW4CblFxoBJgXKbTvkT1vpRhA +qRF3zjGsQDfx3XxSuX35+kEySFqc4zKa53mO21rf2inTi4NY6aGe6qtrsupxuLNbKd4dk fja11e00gJ9urqmIR4+FlYzUy2SzAOQwXcFOWnTIrhD/4NmXNZfbj6diVvVR9ebovanVu4 X0j/saoYUJsOLVz6uWreyU+/TpSVyAMqPeOPWxszshg0rE3xO7qlUA4rIL9bJDiodAsofz 8iPz39d8dvaF9Zp1kvcydj/xc5zT0YtUtKgF+CpUeTQ1evSGI2YhFf1T0y3rLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728382160; a=rsa-sha256; cv=none; b=ZJGq+zEEy1E4arY9ii+tyDkdikNxezxO0HhFvQxEBNK7R5uBkVMrvwX6UziXfBQ8ljSm77 Hf+I6nLGUcOIDjsA/0m2KEnZgPbcwDNzvcCFr1dhGv8LGiFOo8OswPhvceqKUerWMCaFlX AUsXLpTnWEjU+mX5Ixl1UB5nD4d5V07Fvc14L4c3muyc0hU6+barUn9qWfSVbzuNLsdZhW W1H5TSH1rI2/yejyUYb0PGvCTciWVkM1qeFK5iqeSO6Py5bmRPf8zH1dplCKDOZHGyb/aj 4pz3WqZxqbvMSwriOpQ8VUSLeZsx2KjZTJQpFHaQt2EpIEIleeygiXmaTa9PZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XNBZR6qs7zR26; Tue, 8 Oct 2024 10:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 498A9J7o059080; Tue, 8 Oct 2024 10:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 498A9JQL059077; Tue, 8 Oct 2024 10:09:19 GMT (envelope-from git) Date: Tue, 8 Oct 2024 10:09:19 GMT Message-Id: <202410081009.498A9JQL059077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 36fe8266ef09 - stable/13 - hhook: Sprinkle const qualifiers where appropriate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 36fe8266ef0948ed40679dc2a827c4c056ee9296 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=36fe8266ef0948ed40679dc2a827c4c056ee9296 commit 36fe8266ef0948ed40679dc2a827c4c056ee9296 Author: Zhenlei Huang AuthorDate: 2024-10-01 15:28:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-08 10:07:18 +0000 hhook: Sprinkle const qualifiers where appropriate No functional change intended. MFC after: 1 week (cherry picked from commit 941f8aceac1b6c16ca4d96b52e60ab437c4f9207) (cherry picked from commit 18aa2a81c4651be2c7705f26f98175efa4f7a859) --- 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);