Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 2021 22:18:40 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 22e20d852ff4 - main - LinuxKPI: fix bug in le32p_replace_bits()
Message-ID:  <202107312218.16VMIepQ099489@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

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

commit 22e20d852ff400a486da24e5d1d92c841a3e39d9
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2021-07-29 21:27:21 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2021-07-31 22:15:35 +0000

    LinuxKPI: fix bug in le32p_replace_bits()
    
    Fix a bug that slipped in in 90707c4e44de03ea36be183ef2226601c66169cb
    using the correct field in le32p_replace_bits().
    
    MFC after:      3 days
    Reviewed by:    hselasky
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D31352
---
 sys/compat/linuxkpi/common/include/linux/bitfield.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h
index 27082cbd4886..a805c1bca5a1 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitfield.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h
@@ -90,7 +90,7 @@ static __inline void
 le32p_replace_bits(uint32_t *p, uint32_t v, uint32_t f)
 {
 
-	*p = (*p & ~(cpu_to_le32(v))) | le32_encode_bits(v, f);
+	*p = (*p & ~(cpu_to_le32(f))) | le32_encode_bits(v, f);
 }
 
 #define	__bf_shf(x)	(__builtin_ffsll(x) - 1)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107312218.16VMIepQ099489>