From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998AbbDUKNI (ORCPT ); Tue, 21 Apr 2015 06:13:08 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:52231 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbbDUKNG (ORCPT ); Tue, 21 Apr 2015 06:13:06 -0400 From: Geert Uytterhoeven To: Andrew Morton , Andy Shevchenko , Andi Kleen Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] hexdump: Make test data really const Date: Tue, 21 Apr 2015 12:13:12 +0200 Message-Id: <1429611192-8079-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: - Drop changing the "result" variable, as this got fixed in commit 17974c054db3 ("hexdump: avoid warning in test function") --- lib/test-hexdump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/test-hexdump.c b/lib/test-hexdump.c index c227cc43ec0a39e6..5241df36eedf922b 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", }; -- 1.9.1