Arnd Bergmann 32a9ff9cc5 lib/checksum.c: fix endianess bug
The new generic checksum code has a small dependency on endianess and
worked only on big-endian systems. I could not find a nice efficient
way to express this, so I added an #ifdef. Using
'result += le16_to_cpu(*buff);' would have worked as well, but
would be slightly less efficient on big-endian systems and IMHO
would not be clearer.

Also fix a bug that prevents this from working on 64-bit machines.
If you have a 64-bit CPU and want to use the generic checksum
code, you should probably do some more optimizations anyway, but
at least the code should not break.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2009-06-19 14:58:13 +02:00
..
2008-07-25 10:53:26 -07:00
2008-07-24 10:47:33 -07:00
2008-06-06 11:29:10 -07:00
2009-06-19 14:58:13 +02:00
2009-01-06 15:59:11 -08:00
2009-01-01 10:12:19 +10:30
2009-06-18 13:04:05 -07:00
2009-06-16 19:47:51 -07:00
2009-04-02 19:04:53 -07:00
2008-07-26 12:00:07 -07:00
2009-02-11 13:38:00 +11:00
2009-06-18 13:04:05 -07:00
2008-07-26 12:00:07 -07:00
2008-07-30 16:29:19 -07:00
2008-07-26 12:00:10 -07:00
2008-07-26 12:00:10 -07:00
2008-07-22 19:24:31 +10:00