From nobody Tue Oct 08 04:46:10 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 4XN3PZ69hkz5Ywsj; Tue, 08 Oct 2024 04:46:10 +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 4XN3PZ5S8Nz4gD9; Tue, 8 Oct 2024 04:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728362770; 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=njsVfvdtBZq5MxB78NepKRH+xK2TnMlpm+88qgOcsxs=; b=iITaemwAjHw50ovkMPzahY+VRD5eHXTVp66ocmW+1TXYdaHQjMlAwMF6FQy+XFleZoRkH6 qbUQercao0oaHDJYL9dmoO7KIfiBGQZumhNQ2ZKjNYV1fcGuiqiQQHqZor9Oad6/+klAZ9 z2k5NK4l/3JI9PP7WRofOv8SRWEqHEj9CT4bbItwqvbpMhuHqAosFXpz2VjgS2CmZJECAo GrrNV9r16mr4QLpviiC9wHlEfMtTP98njQa9X8mMlRXRMvr1H1RaMaAhRmTJBe4WydSn23 OlqBZ/5ZxLSC430ppcVed0c3FuGJfjOGehb3U7RaeqQyIBh/FhB5oBDi7rmPEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728362770; 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=njsVfvdtBZq5MxB78NepKRH+xK2TnMlpm+88qgOcsxs=; b=kdUpNovUY3xC1qC49h2y1vwkpYxKKuPYjwezbXF4rT9w7/nygIEy/g2054oAd+kVcKA3Q4 dlrsfAuQ2RACWFbw0QpqAOt1WHEWiBJAE4hN0ZFnmL9SmUh40LQ7Q1eJ1V6TlW7Jfe3xzD sXK0x5ANqFvXBeqqPec69exptq9MQPgcw8Dp/M9+8huIQWa7eovQdMY7z92p/zUqDnArqg 4CYHhXHqBJvgsSjxJaSL/InmPPO7pKX5SdoCAAD6jaahvW4kE8/8VoyqsWyrENmEUuhu69 84K7z8cMCXwXgt1R6OjazAUT7sRx1G5/N6g9piCFo9PXGpMHfGg+ISliEPsWbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728362770; a=rsa-sha256; cv=none; b=EXDsIxrsf9//iMHevq67fxcnGcHOBGsRWs8sKWFsW14lJBV2YmOvCXjKadh49s1k9mZGzl GHe0OahXfisK5R2taeDfjbngNRoeyrw0bJmJAYD1thQlGFhApcroNfR6jYOciSCUEfc4YX bPJ3hOXmA2PyAMaG4YJT4O1tQH5pCT9hhMj9XnN/HISSXdC0/XUU4U79cKkSTmYOEACeBg 4mbnEPK0RqcskY3RfBxS2h3ytvP60LvJwuzvMALP9+Bl05/CDhVK0++k7EBkJFc6tyXXyP hi6pb1DJil2uwq/nFRCUUBcHt+gDO5OCn3ddynNeD+pqA4KgY0G2QE1/t0ubWw== 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 4XN3PZ4f8bzGcB; Tue, 8 Oct 2024 04:46:10 +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 4984kA4a012572; Tue, 8 Oct 2024 04:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4984kATE012569; Tue, 8 Oct 2024 04:46:10 GMT (envelope-from git) Date: Tue, 8 Oct 2024 04:46:10 GMT Message-Id: <202410080446.4984kATE012569@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: 18aa2a81c465 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 18aa2a81c4651be2c7705f26f98175efa4f7a859 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=18aa2a81c4651be2c7705f26f98175efa4f7a859 commit 18aa2a81c4651be2c7705f26f98175efa4f7a859 Author: Zhenlei Huang AuthorDate: 2024-10-01 15:28:37 +0000 Commit: Zhenlei Huang 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);