Re: [RFC] lib: crc8: add new library module providing crc8algorithm

From: Arend van Spriel
Date: Wed May 25 2011 - 02:49:50 EST


On 05/25/2011 07:46 AM, George Spelvin wrote:
Since you are obviously being ironic in your phrasing, I hope I did not
give serious offense. What I wrote is a fairly accurate description of
my reflex reaction, but I could have phrased it more diplomatically.

No offense. I am not keen on politics anyway so blunt in fine with me ;-)

If callers use the specific function they can not specify a bit order so
no compile-time error.
What I meant was, the bit order is specified by the function name.
An invalid bit order translates to an invalid function name, which the
linker will complain about.

Than we mean the same thing.

If you feel ambitious, you can fold the crc7 code into yours. Its an
msbit-first CRC. The resultant table will be left-justified rather
than the current right-justified, but if you look at all the call sites,
you'll notice that they all shift the result left 1 bit!

We are ambitious, but the focus is on getting our wireless driver in shape. The crc8 library function is related to that. So folding the crc7 will get a low priority for now.

I noticed the whole table changed in the patch you posted in the bug report. So that is because of the shift, right?

Gr. AvS

--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/