mbox series

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

Message ID 20241214085833.8695-1-wsa+renesas@sang-engineering.com (mailing list archive)
Headers show
Series add generic parity calculation for u8 | expand

Message

Wolfram Sang Dec. 14, 2024, 8:58 a.m. UTC
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(-)