make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / fs / jffs2 / crc32.h
1 #ifndef CRC32_H
2 #define CRC32_H
3
4 /* $Id: crc32.h,v 1.1.1.1 2005/04/11 02:50:46 jack Exp $ */
5
6 #include <linux/types.h>
7
8 extern const __u32 crc32_table[256];
9
10 /* Return a 32-bit CRC of the contents of the buffer. */
11
12 static inline __u32 
13 crc32(__u32 val, const void *ss, int len)
14 {
15         const unsigned char *s = ss;
16         while (--len >= 0)
17                 val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8);
18         return val;
19 }
20
21 #endif