[PATCH RFT v2 5/5] i3c: cdns: use get_parity8 helper instead of open coding it

Wolfram Sang wsa+renesas at sang-engineering.com
Thu Jan 2 01:04:55 PST 2025


> >         /* RR0[0] = ~XOR(addr[6:0]) */
> > -       if (!(hweight8(addr & 0x7f) & 1))
> > -               ret |= 1;
> > +       ret |= parity8(addr & 0x7f) ? 0 : BIT(0);
> 
> Perhaps keep the if()-construct, to better match the example in the
> documentation in 1/5?

Can do, don't care super much. I chose this construct because the other
drivers in I3C use the above pattern. You still like the if() better?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-i3c/attachments/20250102/08742788/attachment-0001.sig>


More information about the linux-i3c mailing list