From nobody Tue Oct 01 15:30:34 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 4XJ22M0GYlz5Y0Hx; Tue, 01 Oct 2024 15:30:35 +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 4XJ22L6m6Gz4Bsj; Tue, 1 Oct 2024 15:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727796634; 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=mbYlegZVcVFqS5Dfq1QYJaCvFDY6azlIKFgNcWtejR8=; b=PAbso+ZWPHWGeaxUDg+OdzV38/JkpChncyA1o18tg/3Y4inII/snkDz8x7vafgpENJTFXR jI+DvuJMLNTiZVX+Juo05iKhNX/3n9UigBuO1a1nTXDjaJJDYO3hb+Cd+5w9kTAGJuse/C EHpxVYhTMKXMMasOs/dfBW6odHW+zxN8Mnxbz/4405RIeHuYY+7/ZNZtkJuocA/yQ6cKhG JOd+9WePrULwZ3EAZWm2VSvt7ZPDUoxPOtmrMUMSM6nPbHIdgzlbt4bEAJ3n/cNKVT6azt cLi9s+Q05MR9jiXsvuR6WeEy5SkEE2XRQN18Z8RCUeKE2WiUHhITVo9bPPyuaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727796634; 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=mbYlegZVcVFqS5Dfq1QYJaCvFDY6azlIKFgNcWtejR8=; b=iR20QJA0h/Qa/IYEJJt32I7EO/AL0kO5xpjVmDoNW53KSC9C/HA+ArWmpCQXcX02LUkehC jdCLtWlQp+QJOENOgf56A/COPhnaISHKS9f4GhGrydhAYEgHUzU3g5rgNF6oEs7f865+fF tu5i95pBRCxIYVw6svx8IHU0bSVGpoP8oZ+FVeTmbQklhJ1epGCmSgxabTTtSKXILCOEI6 GSyQ9FoSVinU7vr8fLALZVRPo38coyaMTy1iTH1ElVQO1JQkLBuQmBZxId5MXGwKK993fj XKu+JzpD74yJSvebGjElp39gq10XWxN0dx7b+131EQWNqor1DbsCN5PV6yEV7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727796634; a=rsa-sha256; cv=none; b=A81oGFpRmBwPKBeu2wBBLYCBCPr+DFT3jZwSEiQNJussTgUqY/xqxF4iCGM3o+xgmtrkkO PEJtxEoq+m5D+tVY5m0ZAuewf0SkiDmfwyjoOxIj0A4KsuPUIxbxk9nM6ENEYJNiIuV3HT NvWXwVHKQ3FoSGqh4c52t1TyhIQ5G52F8Af8wPienw7vCD0wvZEuMiCmNokHd8yqYiuRDl Bum5xwK/kEkbeZRDPgGes9jQnL2rLlFtnkinTO47VjQpd2ANAqWDnd2+fTjrFfsxQl73Sv OlYdt7pg8Hka65P9nDbffesCvn7flkUGRAi+QJNVcRC4OzaPG5140HKNBWL4rA== 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 4XJ22L641Yzk4n; Tue, 1 Oct 2024 15:30:34 +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 491FUYF6067211; Tue, 1 Oct 2024 15:30:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 491FUYjh067208; Tue, 1 Oct 2024 15:30:34 GMT (envelope-from git) Date: Tue, 1 Oct 2024 15:30:34 GMT Message-Id: <202410011530.491FUYjh067208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 941f8aceac1b - main - 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/main X-Git-Reftype: branch X-Git-Commit: 941f8aceac1b6c16ca4d96b52e60ab437c4f9207 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=941f8aceac1b6c16ca4d96b52e60ab437c4f9207 commit 941f8aceac1b6c16ca4d96b52e60ab437c4f9207 Author: Zhenlei Huang AuthorDate: 2024-10-01 15:28:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-01 15:28:37 +0000 hhook: Sprinkle const qualifiers where appropriate No functional change intended. MFC after: 1 week --- 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 602cd28990f0..7085ac717b26 100644 --- a/sys/kern/kern_hhook.c +++ b/sys/kern/kern_hhook.c @@ -127,7 +127,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; @@ -184,7 +184,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; @@ -242,7 +242,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; @@ -269,7 +269,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);