lkml.org 
[lkml]   [2011]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [patch v4 1/7] crc32: move-to-documentation.diff
Date


> -----Original Message-----
> From: Joakim Tjernlund [mailto:joakim.tjernlund@transmode.se]
> Sent: Tuesday, August 09, 2011 11:50 AM
> To: George Spelvin
> Cc: akpm@linux-foundation.org; fzago@systemfabricworks.com; linux-
> kernel@vger.kernel.org; rdunlap@xenotime.net;
> rpearson@systemfabricworks.com
> Subject: Re: [patch v4 1/7] crc32: move-to-documentation.diff
>
> "George Spelvin" <linux@horizon.com> wrote on 2011/08/09 13:45:04:
> >
> > Here's a hopefully-improved Documentation file, which explains the
slicing
> > algorithm as well. As long as you have a big diff, it seems worth
tweaking.
> >
> > You also might want to leave a pointer in lib/crc32.c to the relocated
docs.
> >
> > (I'm just inclding the whole changed file because I assume it's easier
> > to review that way; do you prefer a diff?)
>
> Nice, reading this once again I think I found an old typo. See below
>
> Perhaps Bob can add this addition to his patch series?
>
> >
> > === Cut here ===
> ...
> > Or in little-endian:
> > for (i = 0; i < input_bytes; i++) {
> > remainder ^= next_input_byte();
> > for (j = 0; j < 8; j++) {
> > multiple = (remainder & 1) ? CRCPOLY : 0;
> > remainder = (remainder << 1) ^ multiple;
>
> Should not above line be:
> remainder = (remainder >> 1) ^ multiple;

I agree. Will change in text.

> ?
>
> > }
> > }
> >
> > If the input is a multiple of 32 bits, you can even XOR in a 32-bit
> > word at a time and increase the inner loop count to 32.



\
 
 \ /
  Last update: 2011-08-09 20:55    [W:0.054 / U:2.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site