Skip to content

Commit

Permalink
LinuxKPI: fix bug in le32p_replace_bits()
Browse files Browse the repository at this point in the history
Fix a bug that slipped in in 90707c4
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
  • Loading branch information
Bjoern A. Zeeb authored and Bjoern A. Zeeb committed Jul 31, 2021
1 parent c50c850 commit 22e20d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/compat/linuxkpi/common/include/linux/bitfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22e20d8

Please sign in to comment.