Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330055
b: refs/heads/master
c: 8f243af
h: refs/heads/master
i:
  330053: d481801
  330051: 912fb27
  330047: 5ad8e4b
v: v3
  • Loading branch information
Joe Mario authored and Linus Torvalds committed Oct 5, 2012
1 parent 40d3063 commit 3dfd0b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7fd5bc77e9dc8da74bf833d9312076a86d2823e
refs/heads/master: 8f243af42adef5f589b8e39656284ca9c9374e44
9 changes: 6 additions & 3 deletions trunk/lib/crc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
#else
u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
{
return crc32_le_generic(crc, p, len, crc32table_le, CRCPOLY_LE);
return crc32_le_generic(crc, p, len,
(const u32 (*)[256])crc32table_le, CRCPOLY_LE);
}
u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
{
return crc32_le_generic(crc, p, len, crc32ctable_le, CRC32C_POLY_LE);
return crc32_le_generic(crc, p, len,
(const u32 (*)[256])crc32ctable_le, CRC32C_POLY_LE);
}
#endif
EXPORT_SYMBOL(crc32_le);
Expand Down Expand Up @@ -253,7 +255,8 @@ u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
#else
u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
{
return crc32_be_generic(crc, p, len, crc32table_be, CRCPOLY_BE);
return crc32_be_generic(crc, p, len,
(const u32 (*)[256])crc32table_be, CRCPOLY_BE);
}
#endif
EXPORT_SYMBOL(crc32_be);
Expand Down
6 changes: 3 additions & 3 deletions trunk/lib/gen_crc32table.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int main(int argc, char** argv)

if (CRC_LE_BITS > 1) {
crc32init_le();
printf("static const u32 __cacheline_aligned "
printf("static u32 __cacheline_aligned "
"crc32table_le[%d][%d] = {",
LE_TABLE_ROWS, LE_TABLE_SIZE);
output_table(crc32table_le, LE_TABLE_ROWS,
Expand All @@ -119,7 +119,7 @@ int main(int argc, char** argv)

if (CRC_BE_BITS > 1) {
crc32init_be();
printf("static const u32 __cacheline_aligned "
printf("static u32 __cacheline_aligned "
"crc32table_be[%d][%d] = {",
BE_TABLE_ROWS, BE_TABLE_SIZE);
output_table(crc32table_be, LE_TABLE_ROWS,
Expand All @@ -128,7 +128,7 @@ int main(int argc, char** argv)
}
if (CRC_LE_BITS > 1) {
crc32cinit_le();
printf("static const u32 __cacheline_aligned "
printf("static u32 __cacheline_aligned "
"crc32ctable_le[%d][%d] = {",
LE_TABLE_ROWS, LE_TABLE_SIZE);
output_table(crc32ctable_le, LE_TABLE_ROWS,
Expand Down

0 comments on commit 3dfd0b1

Please sign in to comment.