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

From: Christopher Bostic
Date: Thu Dec 08 2016 - 14:43:41 EST


On Wed, Dec 7, 2016 at 5:33 PM, Jeremy Kerr <jk@xxxxxxxxxx> wrote:
> 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?

Hi Jeremy,

I'll take this one. Will implement as per Greg's suggestions.

Thanks,
Chris

>
> Cheers,
>
>
> Jeremy