RE: [patch v4 1/7] crc32: move-to-documentation.diff

From: Bob Pearson
Date: Tue Aug 09 2011 - 14:52:38 EST




> -----Original Message-----
> From: Joakim Tjernlund [mailto:joakim.tjernlund@xxxxxxxxxxxx]
> Sent: Tuesday, August 09, 2011 11:50 AM
> To: George Spelvin
> Cc: akpm@xxxxxxxxxxxxxxxxxxxx; fzago@xxxxxxxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; rdunlap@xxxxxxxxxxxx;
> rpearson@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [patch v4 1/7] crc32: move-to-documentation.diff
>
> "George Spelvin" <linux@xxxxxxxxxxx> 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.

--
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/