[PATCH 08/16] drivers/fsi: Add crc4 helpers

Jeremy Kerr jk at ozlabs.org
Wed Dec 7 15:33:08 PST 2016


Hi Greg,

> Why not just create lib/crc4.c with these functions, like the other crc
> functions in the kernel?

Two (bad) reasons:

 - The crc4 implementation here is pretty specific to the FSI
   usage (only supporting 4-bit-sized chunks), to keep the math & lookup
   table simple

 - I'm lazy

So yes, we should spend the effort now to make this generic enough for
a lib/crc4.c. Would we want to support different values for the
polynomial?

Chris: do you want me to to that, or will you?

Cheers,


Jeremy



More information about the linux-arm-kernel mailing list