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

From: Arend van Spriel
Date: Sun May 22 2011 - 08:47:37 EST


On 05/22/2011 01:23 PM, Alan Cox wrote:
On Sat, 21 May 2011 22:49:33 +0200
"Arend van Spriel"<arend@xxxxxxxxxxxx> wrote:

The brcm80211 driver in staging tree uses a crc8 function. Based on
feedback from John Linville to move this to lib directory, the linux
source has been searched. Although there is currently only one other
kernel driver using this algorithm (ie. drivers/ssb) we are providing
this as a library function for others to use.
Can we find a better name for it - there seem to be lots of CRC8 variants
that are different - eg bit direction and it's going to be confusing to
just call it 'crc8'

No problem. I just had a look at the lib directory and noticed the crc7 function and module is called crc7. I can imagine there are enough variants of that as well. Another variation is probably the polynomial used. Not sure how to factor in bit direction and polynomial into the name.

suggestions from my thumb:
- rnw_crc8: refers to Ross N. Williams who wrote the paper used for implementing this function.
- painless_crc8: refers to title of the paper "A Painless Guide to CRC Error Detection Algorithms".
- brcm_crc8: indicates where the function came from.

Other suggestions are welcome.

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/