[RFC PATCH 0/2] add generic parity calculation for u8

From: Wolfram Sang
Date: Sat Dec 14 2024 - 03:59:01 EST


Here is a small series to provide generic parity calculation in the
kernel. There are already some open coded versions. I especially want to
avoid more of that in the I3C world, where odd parity is frequently
used. This series will allow for cleanups there. More detailed
motivation can be found in patch 1.

Based on 6.13-rc2. Build tested only, as I don't have SPD5118 HW.
Still RFC to discuss the placement in bitops.h and maybe Guenter can
test this series?

Looking forward to comments.


Wolfram Sang (2):
bitops: add generic parity calculation for u8
hwmon: (spd5118) Use generic parity calculation

drivers/hwmon/spd5118.c | 8 +-------
include/linux/bitops.h | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 7 deletions(-)

--
2.45.2