git: b84dd938c913 - stable/14 - linuxkpi: Remove incorrect + 1 from HWEIGHT* macros

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Tue, 22 Jul 2025 16:02:58 UTC
The branch stable/14 has been updated by emaste:

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

commit b84dd938c9130a0416a5c55fc0d012ecafc5b231
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-06-24 13:36:54 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-07-22 15:59:55 +0000

    linuxkpi: Remove incorrect + 1 from HWEIGHT* macros
    
    Fixes: 4cc8a9da491d ("LinuxKPI: add HWEIGHT32()")
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D51010
    
    (cherry picked from commit cdbff1b2999660b31b2de076d04670722a555ed2)
---
 sys/compat/linuxkpi/common/include/linux/bitops.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h
index 1415d5224084..2af891791130 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitops.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitops.h
@@ -62,10 +62,10 @@
 #define	hweight64(x)	bitcount64(x)
 #define	hweight_long(x)	bitcountl(x)
 
-#define	HWEIGHT8(x)	(bitcount8((uint8_t)(x)) + 1)
-#define	HWEIGHT16(x)	(bitcount16(x) + 1)
-#define	HWEIGHT32(x)	(bitcount32(x) + 1)
-#define	HWEIGHT64(x)	(bitcount64(x) + 1)
+#define	HWEIGHT8(x)	(bitcount8((uint8_t)(x)))
+#define	HWEIGHT16(x)	(bitcount16(x))
+#define	HWEIGHT32(x)	(bitcount32(x))
+#define	HWEIGHT64(x)	(bitcount64(x))
 
 static inline int
 __ffs(int mask)