From nobody Tue Jun 24 22:42:50 2025 X-Original-To: dev-commits-src-main@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 4bRg2L5z0xz60N9g; Tue, 24 Jun 2025 22:42:50 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bRg2L5RcLz3GZp; Tue, 24 Jun 2025 22:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750804970; 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=2wtkASBR8m/Le4kBvgABtBGvEUXr1xNKc46A4YKiBm0=; b=Iu+6UBlIsQ6jXAAvLrd9fNbK9Mc2uubeuRxBnLQyjke+mRq33qNUeuO+6F0jyLxg0r3bqm KmljQUN7RSnI/oV8EoGtkbJRijJ6cWBgM5wJtQlQpDvwu8Vj8tx3e0zeidbrN9rGO+iWol 0840YO+09N96+H75svkEnY+EQ3CrPzABYF5Bv3yFAsajdEklMH/O9jKAtQ0YuEyr0zmVoU Wt0IgsiduDaXkSTKC8z5qJn7bNhZ0IETxHc3pyukIV28BtWNtwIGcd1mZPTKbONSVjP3Ql MB2z3Fxfh5XEeZqP3ImPdOuHEK25avhcDyoSStRHHujUVq66oifKhhGOaPCgcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750804970; 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=2wtkASBR8m/Le4kBvgABtBGvEUXr1xNKc46A4YKiBm0=; b=t+Ca5iK+s0hJ6uRaWbFMdHAnjDfvGqla/Dp3Igy6wT2VuO3RQMpU5SZMMVaiekZUaqoeJU M3ca2px83RL9E8kLDlmZ2kB3IP60ULpzL792+x+iwI6h9l0TdlONosB76xvQnk/GwpkrWz 3mT2TnkUcayc1l1TvGLaBVhTlsiZN7oyUfrDkYfyozjRAlI+HEINv2M3th5kllIhjuvBQ/ ljG3l6oyKam5uX/KeUcwLX8ZM9JWYKXJiE9dwe1CagbDsh5tQHXyz6YFEwszo1QgRK5eWR vLReN3XvZjPpiktNn7K/JOAHNaTpd5JfvesJLDtUQIQKdre4LlMk/eiJmhTLMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750804970; a=rsa-sha256; cv=none; b=uubdrveRcn90dBVhKo+hosfB6L+1mIjSUJhlFA8JKybQx8iHLpGs1rGIVNxxdqzpUMOTmD ptWZahHKaOlYJYlNnqYUKq/BaskUNT7yOaDajUSxjZl9FyleoPTzp7n5Gs3LijZnmfQW5t NmDC6amg6/3BR0HVWR5JJyV+9wXQNd8zsBJ5ZphYSi0AHRbuZSysoJuP1ZnkWkejQG68Bz Eq3ipikKlZC7+DWlSUDRD55IBrneECHb4tUPFfQMVhRUDuhQgYPhSmV+0KVgh0s71nF2NO uSXbw6v0jdXPq9SfzS0aUa6gNRVBZZCcGWC9ltYdF/Ey7GHLUgM/FTIo6bWLxA== 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 4bRg2L4wzbz16KM; Tue, 24 Jun 2025 22:42:50 +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 55OMgoiA072756; Tue, 24 Jun 2025 22:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55OMgowk072753; Tue, 24 Jun 2025 22:42:50 GMT (envelope-from git) Date: Tue, 24 Jun 2025 22:42:50 GMT Message-Id: <202506242242.55OMgowk072753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cdbff1b29996 - main - linuxkpi: Remove incorrect + 1 from HWEIGHT* macros List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cdbff1b2999660b31b2de076d04670722a555ed2 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cdbff1b2999660b31b2de076d04670722a555ed2 commit cdbff1b2999660b31b2de076d04670722a555ed2 Author: Ed Maste AuthorDate: 2025-06-24 13:36:54 +0000 Commit: Ed Maste CommitDate: 2025-06-24 22:42:16 +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 --- 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 23aabb546cb2..bc776a0db9c4 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)