summaryrefslogtreecommitdiffstats
path: root/lib/test-hexdump.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-06-26 00:02:11 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-26 02:00:40 +0200
commit79e23d577b938d8d79282fd979f4ff3112e1f3f9 (patch)
tree9c5f447cff93c48c80f5e54a171fbb07e0e159d4 /lib/test-hexdump.c
parent__bitmap_parselist: fix bug in empty string handling (diff)
downloadlinux-79e23d577b938d8d79282fd979f4ff3112e1f3f9.tar.xz
linux-79e23d577b938d8d79282fd979f4ff3112e1f3f9.zip
hexdump: Make test data really const
The test data arrays, containing pointers to test strings, are never modified, so they can be const, too. Hence mark them "const" and "__initconst". This moves 28 pointers from ".init.data" to ".init.rodata". Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: 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/test-hexdump.c')
-rw-r--r--lib/test-hexdump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/test-hexdump.c b/lib/test-hexdump.c
index c227cc43ec0a..5241df36eedf 100644
--- a/lib/test-hexdump.c
+++ b/lib/test-hexdump.c
@@ -25,19 +25,19 @@ static const char * const test_data_1_le[] __initconst = {
"4c", "d1", "19", "99", "43", "b1", "af", "0c",
};
-static const char *test_data_2_le[] __initdata = {
+static const char * const test_data_2_le[] __initconst = {
"32be", "7bdb", "180a", "b293",
"ba70", "24c4", "837d", "9b34",
"9ca6", "ad31", "0f9c", "e9ac",
"d14c", "9919", "b143", "0caf",
};
-static const char *test_data_4_le[] __initdata = {
+static const char * const test_data_4_le[] __initconst = {
"7bdb32be", "b293180a", "24c4ba70", "9b34837d",
"ad319ca6", "e9ac0f9c", "9919d14c", "0cafb143",
};
-static const char *test_data_8_le[] __initdata = {
+static const char * const test_data_8_le[] __initconst = {
"b293180a7bdb32be", "9b34837d24c4ba70",
"e9ac0f9cad319ca6", "0cafb1439919d14c",
};