Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
79e23d57 2528a8b8

+3 -3
+3 -3
lib/test-hexdump.c
··· 25 25 "4c", "d1", "19", "99", "43", "b1", "af", "0c", 26 26 }; 27 27 28 - static const char *test_data_2_le[] __initdata = { 28 + static const char * const test_data_2_le[] __initconst = { 29 29 "32be", "7bdb", "180a", "b293", 30 30 "ba70", "24c4", "837d", "9b34", 31 31 "9ca6", "ad31", "0f9c", "e9ac", 32 32 "d14c", "9919", "b143", "0caf", 33 33 }; 34 34 35 - static const char *test_data_4_le[] __initdata = { 35 + static const char * const test_data_4_le[] __initconst = { 36 36 "7bdb32be", "b293180a", "24c4ba70", "9b34837d", 37 37 "ad319ca6", "e9ac0f9c", "9919d14c", "0cafb143", 38 38 }; 39 39 40 - static const char *test_data_8_le[] __initdata = { 40 + static const char * const test_data_8_le[] __initconst = { 41 41 "b293180a7bdb32be", "9b34837d24c4ba70", 42 42 "e9ac0f9cad319ca6", "0cafb1439919d14c", 43 43 };