git: 5c1e4dffc67f - stable/14 - hwpmc_amd: fix INVARIANTS build

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Tue, 13 Oct 2026 12:53:09 UTC
The branch stable/14 has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=5c1e4dffc67f6671d704474a237b28e4aaee66da

commit 5c1e4dffc67f6671d704474a237b28e4aaee66da
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2026-10-13 12:50:52 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-10-13 12:52:31 +0000

    hwpmc_amd: fix INVARIANTS build
    
    The variable 'amd_npmcs' is not yet present in this branch.
    
    This is a direct commit to stable/14.
    
    Reported by:    Jenkins
    Sponsored by:   The FreeBSD Foundation
---
 sys/dev/hwpmc/hwpmc_amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c
index 1e8f1421eca2..39f317f91832 100644
--- a/sys/dev/hwpmc/hwpmc_amd.c
+++ b/sys/dev/hwpmc/hwpmc_amd.c
@@ -925,7 +925,7 @@ amd_get_msr(int ri, uint32_t *msr)
 static int
 amd_get_caps(int ri, uint32_t *caps)
 {
-	KASSERT(ri >= 0 && ri < amd_npmcs,
+	KASSERT(ri >= 0 && ri < AMD_NPMCS,
 	    ("[amd,%d] ri %d out of range", __LINE__, ri));
 
 	*caps = amd_pmcdesc[ri].pm_descr.pd_caps;