diff options
author | George Spelvin <linux@horizon.com> | 2014-06-23 09:11:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-25 19:03:59 -0400 |
commit | 4fa8e03b22df9b34f87906fa29de788bfa628bff (patch) | |
tree | 60a755b2ff7a67ca031b60a0974b86f9b93b693e /lib | |
parent | 6d514b4e7737ad75a7e7e0a3f7dde45d46341691 (diff) |
lib: crc32: Mark test data __initconst
So it gets discarded after the selftest.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crc32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crc32.c b/lib/crc32.c index 9af30ff334c5..af938ab12468 100644 --- a/lib/crc32.c +++ b/lib/crc32.c | |||
@@ -344,7 +344,7 @@ EXPORT_SYMBOL(crc32_be); | |||
344 | #ifdef CONFIG_CRC32_SELFTEST | 344 | #ifdef CONFIG_CRC32_SELFTEST |
345 | 345 | ||
346 | /* 4096 random bytes */ | 346 | /* 4096 random bytes */ |
347 | static u8 __attribute__((__aligned__(8))) test_buf[] = | 347 | static u8 const __aligned(8) test_buf[] __initconst = |
348 | { | 348 | { |
349 | 0x5b, 0x85, 0x21, 0xcb, 0x09, 0x68, 0x7d, 0x30, | 349 | 0x5b, 0x85, 0x21, 0xcb, 0x09, 0x68, 0x7d, 0x30, |
350 | 0xc7, 0x69, 0xd7, 0x30, 0x92, 0xde, 0x59, 0xe4, | 350 | 0xc7, 0x69, 0xd7, 0x30, 0x92, 0xde, 0x59, 0xe4, |
@@ -868,7 +868,7 @@ static struct crc_test { | |||
868 | u32 crc_le; /* expected crc32_le result */ | 868 | u32 crc_le; /* expected crc32_le result */ |
869 | u32 crc_be; /* expected crc32_be result */ | 869 | u32 crc_be; /* expected crc32_be result */ |
870 | u32 crc32c_le; /* expected crc32c_le result */ | 870 | u32 crc32c_le; /* expected crc32c_le result */ |
871 | } test[] = | 871 | } const test[] __initconst = |
872 | { | 872 | { |
873 | {0x674bf11d, 0x00000038, 0x00000542, 0x0af6d466, 0xd8b6e4c1, 0xf6e93d6c}, | 873 | {0x674bf11d, 0x00000038, 0x00000542, 0x0af6d466, 0xd8b6e4c1, 0xf6e93d6c}, |
874 | {0x35c672c6, 0x0000003a, 0x000001aa, 0xc6d3dfba, 0x28aaf3ad, 0x0fe92aca}, | 874 | {0x35c672c6, 0x0000003a, 0x000001aa, 0xc6d3dfba, 0x28aaf3ad, 0x0fe92aca}, |