Skip to content

Commit 79e23d5

Browse files
geertutorvalds
authored andcommitted
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 <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2528a8b commit 79e23d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/test-hexdump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ static const char * const test_data_1_le[] __initconst = {
2525
"4c", "d1", "19", "99", "43", "b1", "af", "0c",
2626
};
2727

28-
static const char *test_data_2_le[] __initdata = {
28+
static const char * const test_data_2_le[] __initconst = {
2929
"32be", "7bdb", "180a", "b293",
3030
"ba70", "24c4", "837d", "9b34",
3131
"9ca6", "ad31", "0f9c", "e9ac",
3232
"d14c", "9919", "b143", "0caf",
3333
};
3434

35-
static const char *test_data_4_le[] __initdata = {
35+
static const char * const test_data_4_le[] __initconst = {
3636
"7bdb32be", "b293180a", "24c4ba70", "9b34837d",
3737
"ad319ca6", "e9ac0f9c", "9919d14c", "0cafb143",
3838
};
3939

40-
static const char *test_data_8_le[] __initdata = {
40+
static const char * const test_data_8_le[] __initconst = {
4141
"b293180a7bdb32be", "9b34837d24c4ba70",
4242
"e9ac0f9cad319ca6", "0cafb1439919d14c",
4343
};

0 commit comments

Comments
 (0)