From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934641Ab2C3UIw (ORCPT ); Fri, 30 Mar 2012 16:08:52 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:53418 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934263Ab2C3UF1 (ORCPT ); Fri, 30 Mar 2012 16:05:27 -0400 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-kernel@vger.kernel.org, Andrew Morton Cc: kernel@pengutronix.de, Alexey Dobriyan Subject: [PATCH v2 15/15] kstrtox: mark const init data with __initconst instead of __initdata Date: Fri, 30 Mar 2012 22:05:05 +0200 Message-Id: <1333137905-13809-15-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <20120330200358.GV15647@pengutronix.de> References: <20120330200358.GV15647@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As long as there is no other non-const variable marked __initdata in the same compilation unit it doesn't hurt. If there were one however compilation would fail with error: $variablename causes a section type conflict because a section containing const variables is marked read only and so cannot contain non-const variables. Signed-off-by: Uwe Kleine-König Cc: Alexey Dobriyan --- no changes since (implicit) v1 lib/test-kstrtox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/test-kstrtox.c b/lib/test-kstrtox.c index d55769d..bea3f3f 100644 --- a/lib/test-kstrtox.c +++ b/lib/test-kstrtox.c @@ -11,7 +11,7 @@ struct test_fail { }; #define DEFINE_TEST_FAIL(test) \ - const struct test_fail test[] __initdata + const struct test_fail test[] __initconst #define DECLARE_TEST_OK(type, test_type) \ test_type { \ @@ -21,7 +21,7 @@ struct test_fail { } #define DEFINE_TEST_OK(type, test) \ - const type test[] __initdata + const type test[] __initconst #define TEST_FAIL(fn, type, fmt, test) \ { \ -- 1.7.9.5