diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-06-26 17:19:40 -0400 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-06-26 17:19:40 -0400 |
| commit | 2a322e4c08be4e7cb0c04b427ddaaa679fd88863 (patch) | |
| tree | ad8cc17bfd3b5e57e36f07a249028667d72f0b96 /lib | |
| parent | ba6d2377c85c9b8a793f455d8c9b6cf31985d70f (diff) | |
| parent | 8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff) | |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig | 28 | ||||
| -rw-r--r-- | lib/bitmap.c | 3 | ||||
| -rw-r--r-- | lib/sha1.c | 2 |
3 files changed, 8 insertions, 25 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 455833a9e31a..eeb429a52152 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
| @@ -63,32 +63,16 @@ config REED_SOLOMON_ENC16 | |||
| 63 | config REED_SOLOMON_DEC16 | 63 | config REED_SOLOMON_DEC16 |
| 64 | boolean | 64 | boolean |
| 65 | 65 | ||
| 66 | # | ||
| 67 | # Textsearch support is select'ed if needed | ||
| 68 | # | ||
| 66 | config TEXTSEARCH | 69 | config TEXTSEARCH |
| 67 | boolean "Textsearch infrastructure" | 70 | boolean |
| 68 | default y | ||
| 69 | help | ||
| 70 | Say Y here if you want to provide a textsearch infrastructure | ||
| 71 | to other subsystems. | ||
| 72 | 71 | ||
| 73 | config TEXTSEARCH_KMP | 72 | config TEXTSEARCH_KMP |
| 74 | depends on TEXTSEARCH | 73 | tristate |
| 75 | tristate "Knuth-Morris-Pratt" | ||
| 76 | help | ||
| 77 | Say Y here if you want to be able to search text using the | ||
| 78 | Knuth-Morris-Pratt textsearch algorithm. | ||
| 79 | |||
| 80 | To compile this code as a module, choose M here: the | ||
| 81 | module will be called ts_kmp. | ||
| 82 | 74 | ||
| 83 | config TEXTSEARCH_FSM | 75 | config TEXTSEARCH_FSM |
| 84 | depends on TEXTSEARCH | 76 | tristate |
| 85 | tristate "Finite state machine" | ||
| 86 | help | ||
| 87 | Say Y here if you want to be able to search text using a | ||
| 88 | naive finite state machine approach implementing a subset | ||
| 89 | of regular expressions. | ||
| 90 | |||
| 91 | To compile this code as a module, choose M here: the | ||
| 92 | module will be called ts_fsm. | ||
| 93 | 77 | ||
| 94 | endmenu | 78 | endmenu |
diff --git a/lib/bitmap.c b/lib/bitmap.c index d1388a5ce89c..fb9371fdd44a 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
| @@ -289,7 +289,6 @@ EXPORT_SYMBOL(__bitmap_weight); | |||
| 289 | 289 | ||
| 290 | #define CHUNKSZ 32 | 290 | #define CHUNKSZ 32 |
| 291 | #define nbits_to_hold_value(val) fls(val) | 291 | #define nbits_to_hold_value(val) fls(val) |
| 292 | #define roundup_power2(val,modulus) (((val) + (modulus) - 1) & ~((modulus) - 1)) | ||
| 293 | #define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10)) | 292 | #define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10)) |
| 294 | #define BASEDEC 10 /* fancier cpuset lists input in decimal */ | 293 | #define BASEDEC 10 /* fancier cpuset lists input in decimal */ |
| 295 | 294 | ||
| @@ -316,7 +315,7 @@ int bitmap_scnprintf(char *buf, unsigned int buflen, | |||
| 316 | if (chunksz == 0) | 315 | if (chunksz == 0) |
| 317 | chunksz = CHUNKSZ; | 316 | chunksz = CHUNKSZ; |
| 318 | 317 | ||
| 319 | i = roundup_power2(nmaskbits, CHUNKSZ) - CHUNKSZ; | 318 | i = ALIGN(nmaskbits, CHUNKSZ) - CHUNKSZ; |
| 320 | for (; i >= 0; i -= CHUNKSZ) { | 319 | for (; i >= 0; i -= CHUNKSZ) { |
| 321 | chunkmask = ((1ULL << chunksz) - 1); | 320 | chunkmask = ((1ULL << chunksz) - 1); |
| 322 | word = i / BITS_PER_LONG; | 321 | word = i / BITS_PER_LONG; |
diff --git a/lib/sha1.c b/lib/sha1.c index 2f7f1148dfde..1cdabe3065f9 100644 --- a/lib/sha1.c +++ b/lib/sha1.c | |||
| @@ -41,7 +41,7 @@ void sha_transform(__u32 *digest, const char *in, __u32 *W) | |||
| 41 | __u32 a, b, c, d, e, t, i; | 41 | __u32 a, b, c, d, e, t, i; |
| 42 | 42 | ||
| 43 | for (i = 0; i < 16; i++) | 43 | for (i = 0; i < 16; i++) |
| 44 | W[i] = be32_to_cpu(((const __u32 *)in)[i]); | 44 | W[i] = be32_to_cpu(((const __be32 *)in)[i]); |
| 45 | 45 | ||
| 46 | for (i = 0; i < 64; i++) | 46 | for (i = 0; i < 64; i++) |
| 47 | W[i+16] = rol32(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 1); | 47 | W[i+16] = rol32(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 1); |
