aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crc32.c
diff options
context:
space:
mode:
authorJoe Mario <jmario@redhat.com>2012-10-04 20:12:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-05 14:04:46 -0400
commit8f243af42adef5f589b8e39656284ca9c9374e44 (patch)
tree9da2b6a244968b625c14538aa165615f2ac070c8 /lib/crc32.c
parentc7fd5bc77e9dc8da74bf833d9312076a86d2823e (diff)
sections: fix const sections for crc32 table
Fix the const sections for the code generated by crc32 table. There's no ro version of the cacheline aligned section, so we cannot put in const data without a conflict Just don't make the crc tables const for now. [ak@linux.intel.com: some fixes and new description] [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Joe Mario <jmario@redhat.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/crc32.c')
-rw-r--r--lib/crc32.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/crc32.c b/lib/crc32.c
index 61774b8db4de..072fbd8234d5 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -188,11 +188,13 @@ u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
188#else 188#else
189u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) 189u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
190{ 190{
191 return crc32_le_generic(crc, p, len, crc32table_le, CRCPOLY_LE); 191 return crc32_le_generic(crc, p, len,
192 (const u32 (*)[256])crc32table_le, CRCPOLY_LE);
192} 193}
193u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len) 194u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
194{ 195{
195 return crc32_le_generic(crc, p, len, crc32ctable_le, CRC32C_POLY_LE); 196 return crc32_le_generic(crc, p, len,
197 (const u32 (*)[256])crc32ctable_le, CRC32C_POLY_LE);
196} 198}
197#endif 199#endif
198EXPORT_SYMBOL(crc32_le); 200EXPORT_SYMBOL(crc32_le);
@@ -253,7 +255,8 @@ u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
253#else 255#else
254u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) 256u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
255{ 257{
256 return crc32_be_generic(crc, p, len, crc32table_be, CRCPOLY_BE); 258 return crc32_be_generic(crc, p, len,
259 (const u32 (*)[256])crc32table_be, CRCPOLY_BE);
257} 260}
258#endif 261#endif
259EXPORT_SYMBOL(crc32_be); 262EXPORT_SYMBOL(crc32_be);