linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-04-03 20:47   ` Linus Walleij
  2012-03-30 20:04 ` [PATCH v2 02/15] ARM: " Uwe Kleine-König
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Linus Walleij, Randy Dunlap

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 <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
---
changes since (implict) v1:
 - move __initconst after variable name

 Documentation/pinctrl.txt        |    2 +-
 drivers/pinctrl/pinctrl-coh901.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index d97bccf..30b53ed 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -786,7 +786,7 @@ and spi on the second function mapping:
 
 #include <linux/pinctrl/machine.h>
 
-static const struct pinctrl_map __initdata mapping[] = {
+static const struct pinctrl_map mapping[] __initconst = {
 	{
 		.dev_name = "foo-spi.0",
 		.name = PINCTRL_STATE_DEFAULT,
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index 0797eba..55697a5 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -174,7 +174,7 @@ struct u300_gpio_confdata {
 
 
 /* Initial configuration */
-static const struct __initdata u300_gpio_confdata
+static const struct __initconst u300_gpio_confdata
 bs335_gpio_config[BS335_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
 	/* Port 0, pins 0-7 */
 	{
@@ -255,7 +255,7 @@ bs335_gpio_config[BS335_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
 	}
 };
 
-static const struct __initdata u300_gpio_confdata
+static const struct __initconst u300_gpio_confdata
 bs365_gpio_config[BS365_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
 	/* Port 0, pins 0-7 */
 	{
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 02/15] ARM: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
  2012-03-30 20:04 ` [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-04-11 11:34   ` Sekhar Nori
  2012-03-30 20:04 ` [PATCH v2 03/15] FRV: " Uwe Kleine-König
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: kernel, Andrew Victor, Nicolas Ferre,
	Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
	Kevin Hilman, Kukjin Kim, Sascha Hauer, Shawn Guo,
	Lennert Buytenhek, Nicolas Pitre, Eric Miao, Haojian Zhuang,
	David Brown, Daniel Walker, Bryan Huntsman, Tony Lindgren,
	Barry Song, Andrew Lunn, Lucas De Marchi, linux-arm-kernel,
	davinci-linux-open-source, linux-samsung-soc, linux-arm-msm,
	linux-omap

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 <u.kleine-koenig@pengutronix.de>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Barry Song <baohua.song@csr.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: linux-arm-kernel@lists.infradead.org
Cc: davinci-linux-open-source@linux.davincidsp.com
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-omap@vger.kernel.org
---
changes since (implicit) v1:
 - drop changes to several files that were wrong:
   - arch/arm/mach-at91/board-dt.c
   - arch/arm/mach-exynos/*
   - arch/arm/mach-imx/*
   - arch/arm/mach-mmp/mmp-dt.c
   - arch/arm/mach-msm/board-msm8x60.c
   - arch/arm/mach-omap2/board-generic.c
   - arch/arm/mach-omap2/voltagedomains{3x,44}xx_data.c
   - arch/arm/mach-prima2
 - fix position of __initconst
   - arch/arm/mach-kirkwood/addr-map.c
   - arch/arm/mach-orion5x/addr-map.c

 arch/arm/mach-at91/clock.c                  |    2 +-
 arch/arm/mach-davinci/board-tnetv107x-evm.c |    6 ++--
 arch/arm/mach-davinci/da830.c               |   48 +++++++++++++--------------
 arch/arm/mach-davinci/da850.c               |    6 ++--
 arch/arm/mach-dove/addr-map.c               |    2 +-
 arch/arm/mach-kirkwood/addr-map.c           |    2 +-
 arch/arm/mach-msm/board-qsd8x50.c           |    4 +--
 arch/arm/mach-omap2/display.c               |    6 ++--
 arch/arm/mach-orion5x/addr-map.c            |    2 +-
 9 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index a0f4d74..e4a255d 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -613,7 +613,7 @@ fail:
 	return 0;
 }
 
-static struct clk *const standard_pmc_clocks[] __initdata = {
+static struct clk *const standard_pmc_clocks[] __initconst = {
 	/* four primary clocks */
 	&clk32k,
 	&main_clk,
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index 5f14e30..645a587 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -88,7 +88,7 @@ static struct davinci_mmc_config mmc_config = {
 	.version	= MMC_CTLR_VERSION_1,
 };
 
-static const short sdio1_pins[] __initdata = {
+static const short sdio1_pins[] __initconst = {
 	TNETV107X_SDIO1_CLK_1,		TNETV107X_SDIO1_CMD_1,
 	TNETV107X_SDIO1_DATA0_1,	TNETV107X_SDIO1_DATA1_1,
 	TNETV107X_SDIO1_DATA2_1,	TNETV107X_SDIO1_DATA3_1,
@@ -96,12 +96,12 @@ static const short sdio1_pins[] __initdata = {
 	-1
 };
 
-static const short uart1_pins[] __initdata = {
+static const short uart1_pins[] __initconst = {
 	TNETV107X_UART1_RD,		TNETV107X_UART1_TD,
 	-1
 };
 
-static const short ssp_pins[] __initdata = {
+static const short ssp_pins[] __initconst = {
 	TNETV107X_SSP0_0, TNETV107X_SSP0_1, TNETV107X_SSP0_2,
 	TNETV107X_SSP1_0, TNETV107X_SSP1_1, TNETV107X_SSP1_2,
 	TNETV107X_SSP1_3, -1
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index deee5c2..510648e 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -838,7 +838,7 @@ static const struct mux_config da830_pins[] = {
 #endif
 };
 
-const short da830_emif25_pins[] __initdata = {
+const short da830_emif25_pins[] __initconst = {
 	DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
 	DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
 	DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11,
@@ -853,19 +853,19 @@ const short da830_emif25_pins[] __initdata = {
 	-1
 };
 
-const short da830_spi0_pins[] __initdata = {
+const short da830_spi0_pins[] __initconst = {
 	DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA,
 	DA830_NSPI0_SCS_0,
 	-1
 };
 
-const short da830_spi1_pins[] __initdata = {
+const short da830_spi1_pins[] __initconst = {
 	DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA,
 	DA830_NSPI1_SCS_0,
 	-1
 };
 
-const short da830_mmc_sd_pins[] __initdata = {
+const short da830_mmc_sd_pins[] __initconst = {
 	DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
 	DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
 	DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
@@ -873,32 +873,32 @@ const short da830_mmc_sd_pins[] __initdata = {
 	-1
 };
 
-const short da830_uart0_pins[] __initdata = {
+const short da830_uart0_pins[] __initconst = {
 	DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
 	-1
 };
 
-const short da830_uart1_pins[] __initdata = {
+const short da830_uart1_pins[] __initconst = {
 	DA830_UART1_RXD, DA830_UART1_TXD,
 	-1
 };
 
-const short da830_uart2_pins[] __initdata = {
+const short da830_uart2_pins[] __initconst = {
 	DA830_UART2_RXD, DA830_UART2_TXD,
 	-1
 };
 
-const short da830_usb20_pins[] __initdata = {
+const short da830_usb20_pins[] __initconst = {
 	DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN,
 	-1
 };
 
-const short da830_usb11_pins[] __initdata = {
+const short da830_usb11_pins[] __initconst = {
 	DA830_USB_REFCLKIN,
 	-1
 };
 
-const short da830_uhpi_pins[] __initdata = {
+const short da830_uhpi_pins[] __initconst = {
 	DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3,
 	DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7,
 	DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11,
@@ -909,14 +909,14 @@ const short da830_uhpi_pins[] __initdata = {
 	-1
 };
 
-const short da830_cpgmac_pins[] __initdata = {
+const short da830_cpgmac_pins[] __initconst = {
 	DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV,
 	DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK,
 	DA830_MDIO_D,
 	-1
 };
 
-const short da830_emif3c_pins[] __initdata = {
+const short da830_emif3c_pins[] __initconst = {
 	DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0,
 	DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1,
 	DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2,
@@ -935,7 +935,7 @@ const short da830_emif3c_pins[] __initdata = {
 	-1
 };
 
-const short da830_mcasp0_pins[] __initdata = {
+const short da830_mcasp0_pins[] __initconst = {
 	DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0,
 	DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0,
 	DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3,
@@ -945,7 +945,7 @@ const short da830_mcasp0_pins[] __initdata = {
 	-1
 };
 
-const short da830_mcasp1_pins[] __initdata = {
+const short da830_mcasp1_pins[] __initconst = {
 	DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1,
 	DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1,
 	DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3,
@@ -954,24 +954,24 @@ const short da830_mcasp1_pins[] __initdata = {
 	-1
 };
 
-const short da830_mcasp2_pins[] __initdata = {
+const short da830_mcasp2_pins[] __initconst = {
 	DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2,
 	DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2,
 	DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3,
 	-1
 };
 
-const short da830_i2c0_pins[] __initdata = {
+const short da830_i2c0_pins[] __initconst = {
 	DA830_I2C0_SDA, DA830_I2C0_SCL,
 	-1
 };
 
-const short da830_i2c1_pins[] __initdata = {
+const short da830_i2c1_pins[] __initconst = {
 	DA830_I2C1_SCL, DA830_I2C1_SDA,
 	-1
 };
 
-const short da830_lcdcntl_pins[] __initdata = {
+const short da830_lcdcntl_pins[] __initconst = {
 	DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3,
 	DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7,
 	DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11,
@@ -981,34 +981,34 @@ const short da830_lcdcntl_pins[] __initdata = {
 	-1
 };
 
-const short da830_pwm_pins[] __initdata = {
+const short da830_pwm_pins[] __initconst = {
 	DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A,
 	DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ,
 	DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A,
 	-1
 };
 
-const short da830_ecap0_pins[] __initdata = {
+const short da830_ecap0_pins[] __initconst = {
 	DA830_ECAP0_APWM0,
 	-1
 };
 
-const short da830_ecap1_pins[] __initdata = {
+const short da830_ecap1_pins[] __initconst = {
 	DA830_ECAP1_APWM1,
 	-1
 };
 
-const short da830_ecap2_pins[] __initdata = {
+const short da830_ecap2_pins[] __initconst = {
 	DA830_ECAP2_APWM2,
 	-1
 };
 
-const short da830_eqep0_pins[] __initdata = {
+const short da830_eqep0_pins[] __initconst = {
 	DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B,
 	-1
 };
 
-const short da830_eqep1_pins[] __initdata = {
+const short da830_eqep1_pins[] __initconst = {
 	DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B,
 	-1
 };
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index b44dc84..6676dee 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -576,17 +576,17 @@ static const struct mux_config da850_pins[] = {
 #endif
 };
 
-const short da850_i2c0_pins[] __initdata = {
+const short da850_i2c0_pins[] __initconst = {
 	DA850_I2C0_SDA, DA850_I2C0_SCL,
 	-1
 };
 
-const short da850_i2c1_pins[] __initdata = {
+const short da850_i2c1_pins[] __initconst = {
 	DA850_I2C1_SCL, DA850_I2C1_SDA,
 	-1
 };
 
-const short da850_lcdcntl_pins[] __initdata = {
+const short da850_lcdcntl_pins[] __initconst = {
 	DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3,
 	DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7,
 	DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11,
diff --git a/arch/arm/mach-dove/addr-map.c b/arch/arm/mach-dove/addr-map.c
index 98b8c83b..93ea37d 100644
--- a/arch/arm/mach-dove/addr-map.c
+++ b/arch/arm/mach-dove/addr-map.c
@@ -49,7 +49,7 @@ static struct __initdata orion_addr_map_cfg addr_map_cfg = {
 	.bridge_virt_base = BRIDGE_VIRT_BASE,
 };
 
-static const struct __initdata orion_addr_map_info addr_map_info[] = {
+static const struct orion_addr_map_info addr_map_info[] __initconst = {
 	/*
 	 * Windows for PCIe IO+MEM space.
 	 */
diff --git a/arch/arm/mach-kirkwood/addr-map.c b/arch/arm/mach-kirkwood/addr-map.c
index e9a7180..b2c0dee 100644
--- a/arch/arm/mach-kirkwood/addr-map.c
+++ b/arch/arm/mach-kirkwood/addr-map.c
@@ -44,7 +44,7 @@ static struct __initdata orion_addr_map_cfg addr_map_cfg = {
 	.bridge_virt_base = BRIDGE_VIRT_BASE,
 };
 
-static const struct __initdata orion_addr_map_info addr_map_info[] = {
+static const struct orion_addr_map_info addr_map_info[] __initconst = {
 	/*
 	 * Windows for PCIe IO+MEM space.
 	 */
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 7e8909c..11de242 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -39,8 +39,8 @@
 
 extern struct sys_timer msm_timer;
 
-static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300;
-static const unsigned        qsd8x50_surf_smc91x_gpio __initdata = 156;
+static const resource_size_t qsd8x50_surf_smc91x_base __initconst = 0x70000300;
+static const unsigned        qsd8x50_surf_smc91x_gpio __initconst = 156;
 
 /* Leave smc91x resources empty here, as we'll fill them in
  * at run-time: they vary from board to board, and the true
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 9706c64..df2ef11 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -74,14 +74,14 @@ struct omap_dss_hwmod_data {
 	const int id;
 };
 
-static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initdata = {
+static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initconst = {
 	{ "dss_core", "omapdss_dss", -1 },
 	{ "dss_dispc", "omapdss_dispc", -1 },
 	{ "dss_rfbi", "omapdss_rfbi", -1 },
 	{ "dss_venc", "omapdss_venc", -1 },
 };
 
-static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
+static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initconst = {
 	{ "dss_core", "omapdss_dss", -1 },
 	{ "dss_dispc", "omapdss_dispc", -1 },
 	{ "dss_rfbi", "omapdss_rfbi", -1 },
@@ -89,7 +89,7 @@ static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
 	{ "dss_dsi1", "omapdss_dsi", 0 },
 };
 
-static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
+static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
 	{ "dss_core", "omapdss_dss", -1 },
 	{ "dss_dispc", "omapdss_dispc", -1 },
 	{ "dss_rfbi", "omapdss_rfbi", -1 },
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c
index 3638e5c..277fcf4 100644
--- a/arch/arm/mach-orion5x/addr-map.c
+++ b/arch/arm/mach-orion5x/addr-map.c
@@ -82,7 +82,7 @@ static struct __initdata orion_addr_map_cfg addr_map_cfg = {
 	.bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE,
 };
 
-static const struct __initdata orion_addr_map_info addr_map_info[] = {
+static const struct orion_addr_map_info addr_map_info[] __initconst = {
 	/*
 	 * Setup windows for PCI+PCIe IO+MEM space.
 	 */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 03/15] FRV: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
  2012-03-30 20:04 ` [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata Uwe Kleine-König
  2012-03-30 20:04 ` [PATCH v2 02/15] ARM: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-03-30 20:04 ` [PATCH v2 04/15] net: " Uwe Kleine-König
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, David Howells

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 <u.kleine-koenig@pengutronix.de>
Cc: David Howells <dhowells@redhat.com>
---
no changes since (implicit) v1

 arch/frv/mb93090-mb00/pci-irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index 20f6497..808bcf7 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -28,7 +28,7 @@
  *
  */
 
-static const uint8_t __initdata pci_bus0_irq_routing[32][4] = {
+static const uint8_t pci_bus0_irq_routing[32][4] __initconst = {
 	[0 ] = { IRQ_FPGA_MB86943_PCI_INTA },
 	[16] = { IRQ_FPGA_RTL8029_INTA },
 	[17] = { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB },
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 04/15] net: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (2 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 03/15] FRV: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-03-30 20:04 ` [PATCH v2 05/15] hwmon: " Uwe Kleine-König
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: kernel, Andreas Koensgen, Klaus Kudielka, Joerg Reuter,
	Jean-Paul Roubelat, netdev, linux-hams

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 <u.kleine-koenig@pengutronix.de>
Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
Cc: Klaus Kudielka <klaus.kudielka@ieee.org>
Cc: Joerg Reuter <jreuter@yaina.de>
Cc: Jean-Paul Roubelat <jpr@f6fbb.org>
Cc: netdev@vger.kernel.org
Cc: linux-hams@vger.kernel.org
---
changes since (implicit) v1:
 - drop wrong changes in drivers/net/ethernet/8390/ne3210.c

 drivers/net/hamradio/6pack.c    |    4 ++--
 drivers/net/hamradio/bpqether.c |    2 +-
 drivers/net/hamradio/mkiss.c    |    4 ++--
 drivers/net/hamradio/scc.c      |    2 +-
 drivers/net/hamradio/yam.c      |    2 +-
 drivers/net/tokenring/smctr.c   |    2 +-
 drivers/net/wan/z85230.c        |    2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 64783a0..d225a2a 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -811,9 +811,9 @@ static struct tty_ldisc_ops sp_ldisc = {
 
 /* Initialize 6pack control device -- register 6pack line discipline */
 
-static const char msg_banner[]  __initdata = KERN_INFO \
+static const char msg_banner[]  __initconst = KERN_INFO \
 	"AX.25: 6pack driver, " SIXPACK_VERSION "\n";
-static const char msg_regfail[] __initdata = KERN_ERR  \
+static const char msg_regfail[] __initconst = KERN_ERR  \
 	"6pack: can't register line discipline (err = %d)\n";
 
 static int __init sixpack_init_driver(void)
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 76d5477..c2e5497 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -87,7 +87,7 @@
 
 #include <linux/bpqether.h>
 
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
 	"AX.25: bpqether driver version 004\n";
 
 static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index aed1a61..d694215 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -997,9 +997,9 @@ static struct tty_ldisc_ops ax_ldisc = {
 	.write_wakeup	= mkiss_write_wakeup
 };
 
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
 	"mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n";
-static const char msg_regfail[] __initdata = KERN_ERR \
+static const char msg_regfail[] __initconst = KERN_ERR \
 	"mkiss: can't register line discipline (err = %d)\n";
 
 static int __init mkiss_init_driver(void)
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index efc6c97..1b4a47b 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -182,7 +182,7 @@
 
 #include "z8530.h"
 
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
 	"AX.25: Z8530 SCC driver version "VERSION".dl1bke\n";
 
 static void t_dwait(unsigned long);
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 5a6412e..c6645f1 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -76,7 +76,7 @@
 /* --------------------------------------------------------------------- */
 
 static const char yam_drvname[] = "yam";
-static const char yam_drvinfo[] __initdata = KERN_INFO \
+static const char yam_drvinfo[] __initconst = KERN_INFO \
 	"YAM driver version 0.8 by F1OAT/F6FBB\n";
 
 /* --------------------------------------------------------------------- */
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index cb35fb7..90b5f1e 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -59,7 +59,7 @@
 
 #include "smctr.h"               /* Our Stuff */
 
-static const char version[] __initdata =
+static const char version[] __initconst =
 	KERN_INFO "smctr.c: v1.4 7/12/00 by jschlst@samba.org\n";
 static const char cardname[] = "smctr";
 
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index 0e57690..feacc3b 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL(z8530_queue_xmit);
 /*
  *	Module support
  */
-static const char banner[] __initdata =
+static const char banner[] __initconst =
 	KERN_INFO "Generic Z85C30/Z85230 interface driver v0.02\n";
 
 static int __init z85230_init_driver(void)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (3 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 04/15] net: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-03-31  3:54   ` Guenter Roeck
  2012-03-30 20:04 ` [PATCH v2 06/15] mfd: " Uwe Kleine-König
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: kernel, Jean Delvare, Guenter Roeck, lm-sensors

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 <u.kleine-koenig@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: lm-sensors@lm-sensors.org
---
changes since (implicit) v1:
 - drop wrong changes to drivers/hwmon/w83627hf.c

 drivers/hwmon/w83627ehf.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index a25350c..54922ed 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -2619,15 +2619,15 @@ static struct platform_driver w83627ehf_driver = {
 static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
 				 struct w83627ehf_sio_data *sio_data)
 {
-	static const char __initdata sio_name_W83627EHF[] = "W83627EHF";
-	static const char __initdata sio_name_W83627EHG[] = "W83627EHG";
-	static const char __initdata sio_name_W83627DHG[] = "W83627DHG";
-	static const char __initdata sio_name_W83627DHG_P[] = "W83627DHG-P";
-	static const char __initdata sio_name_W83627UHG[] = "W83627UHG";
-	static const char __initdata sio_name_W83667HG[] = "W83667HG";
-	static const char __initdata sio_name_W83667HG_B[] = "W83667HG-B";
-	static const char __initdata sio_name_NCT6775[] = "NCT6775F";
-	static const char __initdata sio_name_NCT6776[] = "NCT6776F";
+	static const char sio_name_W83627EHF[] __initconst = "W83627EHF";
+	static const char sio_name_W83627EHG[] __initconst = "W83627EHG";
+	static const char sio_name_W83627DHG[] __initconst = "W83627DHG";
+	static const char sio_name_W83627DHG_P[] __initconst = "W83627DHG-P";
+	static const char sio_name_W83627UHG[] __initconst = "W83627UHG";
+	static const char sio_name_W83667HG[] __initconst = "W83667HG";
+	static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B";
+	static const char sio_name_NCT6775[] __initconst = "NCT6775F";
+	static const char sio_name_NCT6776[] __initconst = "NCT6776F";
 
 	u16 val;
 	const char *sio_name;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 06/15] mfd: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (4 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 05/15] hwmon: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-04-16 10:30   ` Samuel Ortiz
  2012-03-30 20:04 ` [PATCH v2 07/15] mips: " Uwe Kleine-König
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Samuel Ortiz

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 <u.kleine-koenig@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
no changes since (implicit) v1

 drivers/mfd/ab5500-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ab5500-core.c b/drivers/mfd/ab5500-core.c
index 54d0fe4..3765c76 100644
--- a/drivers/mfd/ab5500-core.c
+++ b/drivers/mfd/ab5500-core.c
@@ -1291,7 +1291,7 @@ struct ab_family_id {
 	char	*name;
 };
 
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __initconst = {
 	/* AB5500 */
 	{
 		.id = AB5500_1_0,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 07/15] mips: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (5 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 06/15] mfd: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-03-30 20:04 ` [PATCH v2 08/15] h8300: " Uwe Kleine-König
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Ralf Baechle, linux-mips

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 <u.kleine-koenig@pengutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
changes since (implicit) v1:
 - drop wrong changes to arch/mips/bcm63xx/boards/board_bcm963xx.c

 arch/mips/bcm63xx/dev-pcmcia.c         |    4 ++--
 arch/mips/mti-malta/malta-setup.c      |    2 +-
 arch/mips/pci/fixup-mpc30x.c           |    4 ++--
 arch/mips/powertv/asic/asic-calliope.c |    2 +-
 arch/mips/powertv/asic/asic-cronus.c   |    2 +-
 arch/mips/powertv/asic/asic-gaia.c     |    2 +-
 arch/mips/powertv/asic/asic-zeus.c     |    2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/mips/bcm63xx/dev-pcmcia.c b/arch/mips/bcm63xx/dev-pcmcia.c
index de4d917..a551bab 100644
--- a/arch/mips/bcm63xx/dev-pcmcia.c
+++ b/arch/mips/bcm63xx/dev-pcmcia.c
@@ -79,11 +79,11 @@ static int __init config_pcmcia_cs(unsigned int cs,
 	return ret;
 }
 
-static const __initdata struct {
+static const struct {
 	unsigned int	cs;
 	unsigned int	base;
 	unsigned int	size;
-} pcmcia_cs[3] = {
+} pcmcia_cs[3] __initconst = {
 	{
 		.cs	= MPI_CS_PCMCIA_COMMON,
 		.base	= BCM_PCMCIA_COMMON_BASE_PA,
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index b7f37d4..2e28f65 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -111,7 +111,7 @@ static void __init pci_clock_check(void)
 	unsigned int __iomem *jmpr_p =
 		(unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
 	int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07;
-	static const int pciclocks[] __initdata = {
+	static const int pciclocks[] __initconst = {
 		33, 20, 25, 30, 12, 16, 37, 10
 	};
 	int pciclock = pciclocks[jmpr];
diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c
index e08f49c..8e4f828 100644
--- a/arch/mips/pci/fixup-mpc30x.c
+++ b/arch/mips/pci/fixup-mpc30x.c
@@ -22,13 +22,13 @@
 
 #include <asm/vr41xx/mpc30x.h>
 
-static const int internal_func_irqs[] __initdata = {
+static const int internal_func_irqs[] __initconst = {
 	VRC4173_CASCADE_IRQ,
 	VRC4173_AC97_IRQ,
 	VRC4173_USB_IRQ,
 };
 
-static const int irq_tab_mpc30x[] __initdata = {
+static const int irq_tab_mpc30x[] __initconst = {
  [12] = VRC4173_PCMCIA1_IRQ,
  [13] = VRC4173_PCMCIA2_IRQ,
  [29] = MQ200_IRQ,
diff --git a/arch/mips/powertv/asic/asic-calliope.c b/arch/mips/powertv/asic/asic-calliope.c
index 0a170e0..7773f3d 100644
--- a/arch/mips/powertv/asic/asic-calliope.c
+++ b/arch/mips/powertv/asic/asic-calliope.c
@@ -28,7 +28,7 @@
 
 #define CALLIOPE_ADDR(x)	(CALLIOPE_IO_BASE + (x))
 
-const struct register_map calliope_register_map __initdata = {
+const struct register_map calliope_register_map __initconst = {
 	.eic_slow0_strt_add = {.phys = CALLIOPE_ADDR(0x800000)},
 	.eic_cfg_bits = {.phys = CALLIOPE_ADDR(0x800038)},
 	.eic_ready_status = {.phys = CALLIOPE_ADDR(0x80004c)},
diff --git a/arch/mips/powertv/asic/asic-cronus.c b/arch/mips/powertv/asic/asic-cronus.c
index bbc0c12..da076db 100644
--- a/arch/mips/powertv/asic/asic-cronus.c
+++ b/arch/mips/powertv/asic/asic-cronus.c
@@ -28,7 +28,7 @@
 
 #define CRONUS_ADDR(x)	(CRONUS_IO_BASE + (x))
 
-const struct register_map cronus_register_map __initdata = {
+const struct register_map cronus_register_map __initconst = {
 	.eic_slow0_strt_add = {.phys = CRONUS_ADDR(0x000000)},
 	.eic_cfg_bits = {.phys = CRONUS_ADDR(0x000038)},
 	.eic_ready_status = {.phys = CRONUS_ADDR(0x00004C)},
diff --git a/arch/mips/powertv/asic/asic-gaia.c b/arch/mips/powertv/asic/asic-gaia.c
index 91dda68..47683b3 100644
--- a/arch/mips/powertv/asic/asic-gaia.c
+++ b/arch/mips/powertv/asic/asic-gaia.c
@@ -23,7 +23,7 @@
 #include <linux/init.h>
 #include <asm/mach-powertv/asic.h>
 
-const struct register_map gaia_register_map __initdata = {
+const struct register_map gaia_register_map __initconst = {
 	.eic_slow0_strt_add = {.phys = GAIA_IO_BASE + 0x000000},
 	.eic_cfg_bits = {.phys = GAIA_IO_BASE + 0x000038},
 	.eic_ready_status = {.phys = GAIA_IO_BASE + 0x00004C},
diff --git a/arch/mips/powertv/asic/asic-zeus.c b/arch/mips/powertv/asic/asic-zeus.c
index 4a05bb0..6ff4b10 100644
--- a/arch/mips/powertv/asic/asic-zeus.c
+++ b/arch/mips/powertv/asic/asic-zeus.c
@@ -28,7 +28,7 @@
 
 #define ZEUS_ADDR(x)	(ZEUS_IO_BASE + (x))
 
-const struct register_map zeus_register_map __initdata = {
+const struct register_map zeus_register_map __initconst = {
 	.eic_slow0_strt_add = {.phys = ZEUS_ADDR(0x000000)},
 	.eic_cfg_bits = {.phys = ZEUS_ADDR(0x000038)},
 	.eic_ready_status = {.phys = ZEUS_ADDR(0x00004c)},
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 08/15] h8300: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (6 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 07/15] mips: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-03-30 20:04 ` [PATCH v2 09/15] ia64: " Uwe Kleine-König
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Yoshinori Sato

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 <u.kleine-koenig@pengutronix.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
---
no changes since (implict) v1

 arch/h8300/kernel/timer/itu.c     |    2 +-
 arch/h8300/kernel/timer/timer16.c |    2 +-
 arch/h8300/kernel/timer/timer8.c  |    2 +-
 arch/h8300/kernel/timer/tpu.c     |    2 +-
 arch/h8300/platform/h8300h/irq.c  |    4 ++--
 arch/h8300/platform/h8s/irq.c     |    4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/h8300/kernel/timer/itu.c b/arch/h8300/kernel/timer/itu.c
index a2ae5e9..2ab0e42 100644
--- a/arch/h8300/kernel/timer/itu.c
+++ b/arch/h8300/kernel/timer/itu.c
@@ -62,7 +62,7 @@ static struct irqaction itu_irq = {
 	.flags		= IRQF_DISABLED | IRQF_TIMER,
 };
 
-static const int __initdata divide_rate[] = {1, 2, 4, 8};
+static const int divide_rate[] __initconst = {1, 2, 4, 8};
 
 void __init h8300_timer_setup(void)
 {
diff --git a/arch/h8300/kernel/timer/timer16.c b/arch/h8300/kernel/timer/timer16.c
index ae0d381..78f6843 100644
--- a/arch/h8300/kernel/timer/timer16.c
+++ b/arch/h8300/kernel/timer/timer16.c
@@ -57,7 +57,7 @@ static struct irqaction timer16_irq = {
 	.flags		= IRQF_DISABLED | IRQF_TIMER,
 };
 
-static const int __initdata divide_rate[] = {1, 2, 4, 8};
+static const int divide_rate[] __initconst = {1, 2, 4, 8};
 
 void __init h8300_timer_setup(void)
 {
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c
index 7a1533f..ea4eb8d 100644
--- a/arch/h8300/kernel/timer/timer8.c
+++ b/arch/h8300/kernel/timer/timer8.c
@@ -77,7 +77,7 @@ static struct irqaction timer8_irq = {
 	.flags		= IRQF_DISABLED | IRQF_TIMER,
 };
 
-static const int __initdata divide_rate[] = {8, 64, 8192};
+static const int divide_rate[] __initconst = {8, 64, 8192};
 
 void __init h8300_timer_setup(void)
 {
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c
index 2193a2e..eec62d8 100644
--- a/arch/h8300/kernel/timer/tpu.c
+++ b/arch/h8300/kernel/timer/tpu.c
@@ -66,7 +66,7 @@ static struct irqaction tpu_irq = {
 	.flags		= IRQF_DISABLED | IRQF_TIMER,
 };
 
-static const int __initdata divide_rate[] = {
+static const int divide_rate[] __initconst = {
 #if CONFIG_H8300_TPU_CH == 0
 	1,4,16,64,0,0,0,0,
 #elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5)
diff --git a/arch/h8300/platform/h8300h/irq.c b/arch/h8300/platform/h8300h/irq.c
index bc4f51b..a80e1a1 100644
--- a/arch/h8300/platform/h8300h/irq.c
+++ b/arch/h8300/platform/h8300h/irq.c
@@ -14,14 +14,14 @@
 #include <asm/gpio-internal.h>
 #include <asm/regs306x.h>
 
-const int __initdata h8300_saved_vectors[] = {
+const int h8300_saved_vectors[] __initconst = {
 #if defined(CONFIG_GDB_DEBUG)
 	TRAP3_VEC,	/* TRAPA #3 is GDB breakpoint */
 #endif
 	-1,
 };
 
-const h8300_vector __initdata h8300_trap_table[] = {
+const h8300_vector h8300_trap_table[] __initconst = {
 	0, 0, 0, 0, 0, 0, 0, 0,
 	system_call,
 	0,
diff --git a/arch/h8300/platform/h8s/irq.c b/arch/h8300/platform/h8s/irq.c
index 7b5f29f..362b191 100644
--- a/arch/h8300/platform/h8s/irq.c
+++ b/arch/h8300/platform/h8s/irq.c
@@ -18,7 +18,7 @@
 #include <asm/regs267x.h>
 
 /* saved vector list */
-const int __initdata h8300_saved_vectors[]={
+const int h8300_saved_vectors[] __initconst = {
 #if defined(CONFIG_GDB_DEBUG)
 	TRACE_VEC,
 	TRAP3_VEC,
@@ -27,7 +27,7 @@ const int __initdata h8300_saved_vectors[]={
 };
 
 /* trap entry table */
-const H8300_VECTOR __initdata h8300_trap_table[] = {
+const H8300_VECTOR h8300_trap_table[] __initconst = {
 	0,0,0,0,0,
 	trace_break,  /* TRACE */
 	0,0,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 09/15] ia64: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (7 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 08/15] h8300: " Uwe Kleine-König
@ 2012-03-30 20:04 ` Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 10/15] powerpc: " Uwe Kleine-König
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Tony Luck, Fenghua Yu, linux-ia64

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 <u.kleine-koenig@pengutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
---
no changes since (implicit) v1

 arch/ia64/xen/irq_xen.c |    2 +-
 arch/ia64/xen/irq_xen.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index 3bb1223..01f479e 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -433,7 +433,7 @@ xen_resend_irq(unsigned int vector)
 	(void)resend_irq_on_evtchn(vector);
 }
 
-const struct pv_irq_ops xen_irq_ops __initdata = {
+const struct pv_irq_ops xen_irq_ops __initconst = {
 	.register_ipi = xen_register_ipi,
 
 	.assign_irq_vector = xen_assign_irq_vector,
diff --git a/arch/ia64/xen/irq_xen.h b/arch/ia64/xen/irq_xen.h
index 26110f3..1778517 100644
--- a/arch/ia64/xen/irq_xen.h
+++ b/arch/ia64/xen/irq_xen.h
@@ -27,7 +27,7 @@ extern void (*late_time_init)(void);
 extern char xen_event_callback;
 void __init xen_init_IRQ(void);
 
-extern const struct pv_irq_ops xen_irq_ops __initdata;
+extern const struct pv_irq_ops xen_irq_ops __initconst;
 extern void xen_smp_intr_init(void);
 extern void xen_send_ipi(int cpu, int vec);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 10/15] powerpc: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (8 preceding siblings ...)
  2012-03-30 20:04 ` [PATCH v2 09/15] ia64: " Uwe Kleine-König
@ 2012-03-30 20:05 ` Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 11/15] gpio/samsung: " Uwe Kleine-König
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:05 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: kernel, Josh Boyer, Matt Porter, Benjamin Herrenschmidt,
	Paul Mackerras, Anatolij Gustschin, Kumar Gala, Arnd Bergmann,
	linuxppc-dev, cbe-oss-dev

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 <u.kleine-koenig@pengutronix.de>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: cbe-oss-dev@lists.ozlabs.org
---
changes since (implicit) v1:
 - drop wrong changes to several files:
   - arch/powerpc/platforms/40x/ppc40x_simple.c
   - arch/powerpc/platforms/512x/mpc5121_generic.c
   - arch/powerpc/platforms/52xx/lite5200.c
   - arch/powerpc/platforms/52xx/media5200.c
   - arch/powerpc/platforms/52xx/mpc5200_simple.c
   - arch/powerpc/platforms/83xx/mpc830x_rdb.c
   - arch/powerpc/platforms/83xx/mpc831x_rdb.c
   - arch/powerpc/platforms/83xx/mpc837x_rdb.c
   - arch/powerpc/platforms/85xx/tqm85xx.c

 arch/powerpc/platforms/52xx/mpc52xx_pci.c |    2 +-
 arch/powerpc/platforms/cell/qpace_setup.c |    2 +-
 arch/powerpc/platforms/cell/setup.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index bfb11e0..e2d401a 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -93,7 +93,7 @@ struct mpc52xx_pci {
 };
 
 /* MPC5200 device tree match tables */
-const struct of_device_id mpc52xx_pci_ids[] __initdata = {
+const struct of_device_id mpc52xx_pci_ids[] __initconst = {
 	{ .type = "pci", .compatible = "fsl,mpc5200-pci", },
 	{ .type = "pci", .compatible = "mpc5200-pci", },
 	{}
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index 7f9b674..6e3409d 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -61,7 +61,7 @@ static void qpace_progress(char *s, unsigned short hex)
 	printk("*** %04x : %s\n", hex, s ? s : "");
 }
 
-static const struct of_device_id qpace_bus_ids[] __initdata = {
+static const struct of_device_id qpace_bus_ids[] __initconst = {
 	{ .type = "soc", },
 	{ .compatible = "soc", },
 	{ .type = "spider", },
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index fa3e294..4ab0876 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -140,7 +140,7 @@ static int __devinit cell_setup_phb(struct pci_controller *phb)
 	return 0;
 }
 
-static const struct of_device_id cell_bus_ids[] __initdata = {
+static const struct of_device_id cell_bus_ids[] __initconst = {
 	{ .type = "soc", },
 	{ .compatible = "soc", },
 	{ .type = "spider", },
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 11/15] gpio/samsung: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (9 preceding siblings ...)
  2012-03-30 20:05 ` [PATCH v2 10/15] powerpc: " Uwe Kleine-König
@ 2012-03-30 20:05 ` Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 12/15] ide: " Uwe Kleine-König
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:05 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Grant Likely, Linus Walleij

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 <u.kleine-koenig@pengutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Linus Walleij <linus.walleij@stericsson.com>
---
no changes since (implicit) v1

 drivers/gpio/gpio-samsung.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 4627787..fee2e85 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2681,7 +2681,7 @@ static int exynos_gpio_xlate(struct gpio_chip *gc,
 	return gpiospec->args[0];
 }
 
-static const struct of_device_id exynos_gpio_dt_match[] __initdata = {
+static const struct of_device_id exynos_gpio_dt_match[] __initconst = {
 	{ .compatible = "samsung,exynos4-gpio", },
 	{}
 };
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 12/15] ide: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (10 preceding siblings ...)
  2012-03-30 20:05 ` [PATCH v2 11/15] gpio/samsung: " Uwe Kleine-König
@ 2012-03-30 20:05 ` Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 13/15] media/video/s5p-tv: " Uwe Kleine-König
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:05 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, David S. Miller, linux-ide

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 <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-ide@vger.kernel.org
---
no changes since (implicit) v1

 drivers/ide/ali14xx.c   |    4 ++--
 drivers/ide/cmd640.c    |    2 +-
 drivers/ide/dtc2278.c   |    2 +-
 drivers/ide/ht6560b.c   |    2 +-
 drivers/ide/icside.c    |    2 +-
 drivers/ide/qd65xx.c    |    2 +-
 drivers/ide/tx4938ide.c |    2 +-
 drivers/ide/tx4939ide.c |    2 +-
 drivers/ide/umc8672.c   |    2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/ide/ali14xx.c b/drivers/ide/ali14xx.c
index d3be99f..8f3570e 100644
--- a/drivers/ide/ali14xx.c
+++ b/drivers/ide/ali14xx.c
@@ -52,13 +52,13 @@
 
 /* port addresses for auto-detection */
 #define ALI_NUM_PORTS 4
-static const int ports[ALI_NUM_PORTS] __initdata =
+static const int ports[ALI_NUM_PORTS] __initconst =
 	{ 0x074, 0x0f4, 0x034, 0x0e4 };
 
 /* register initialization data */
 typedef struct { u8 reg, data; } RegInitializer;
 
-static const RegInitializer initData[] __initdata = {
+static const RegInitializer initData[] __initconst = {
 	{0x01, 0x0f}, {0x02, 0x00}, {0x03, 0x00}, {0x04, 0x00},
 	{0x05, 0x00}, {0x06, 0x00}, {0x07, 0x2b}, {0x0a, 0x0f},
 	{0x25, 0x00}, {0x26, 0x00}, {0x27, 0x00}, {0x28, 0x00},
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c
index 1471730..70f0a27 100644
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -685,7 +685,7 @@ static int pci_conf2(void)
 	return 0;
 }
 
-static const struct ide_port_info cmd640_port_info __initdata = {
+static const struct ide_port_info cmd640_port_info __initconst = {
 	.chipset		= ide_cmd640,
 	.host_flags		= IDE_HFLAG_SERIALIZE |
 				  IDE_HFLAG_NO_DMA |
diff --git a/drivers/ide/dtc2278.c b/drivers/ide/dtc2278.c
index 46af474..8722df3 100644
--- a/drivers/ide/dtc2278.c
+++ b/drivers/ide/dtc2278.c
@@ -91,7 +91,7 @@ static const struct ide_port_ops dtc2278_port_ops = {
 	.set_pio_mode		= dtc2278_set_pio_mode,
 };
 
-static const struct ide_port_info dtc2278_port_info __initdata = {
+static const struct ide_port_info dtc2278_port_info __initconst = {
 	.name			= DRV_NAME,
 	.chipset		= ide_dtc2278,
 	.port_ops		= &dtc2278_port_ops,
diff --git a/drivers/ide/ht6560b.c b/drivers/ide/ht6560b.c
index 986f251..1e0fd3a 100644
--- a/drivers/ide/ht6560b.c
+++ b/drivers/ide/ht6560b.c
@@ -341,7 +341,7 @@ static const struct ide_port_ops ht6560b_port_ops = {
 	.set_pio_mode		= ht6560b_set_pio_mode,
 };
 
-static const struct ide_port_info ht6560b_port_info __initdata = {
+static const struct ide_port_info ht6560b_port_info __initconst = {
 	.name			= DRV_NAME,
 	.chipset		= ide_ht6560b,
 	.tp_ops 		= &ht6560b_tp_ops,
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 8716066..7e9e1c1 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -453,7 +453,7 @@ err_free:
 	return ret;
 }
 
-static const struct ide_port_info icside_v6_port_info __initdata = {
+static const struct ide_port_info icside_v6_port_info __initconst = {
 	.init_dma		= icside_dma_off_init,
 	.port_ops		= &icside_v6_no_dma_port_ops,
 	.dma_ops		= &icside_v6_dma_ops,
diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c
index e03f4f1..a6fb6a8 100644
--- a/drivers/ide/qd65xx.c
+++ b/drivers/ide/qd65xx.c
@@ -335,7 +335,7 @@ static const struct ide_port_ops qd6580_port_ops = {
 	.set_pio_mode		= qd6580_set_pio_mode,
 };
 
-static const struct ide_port_info qd65xx_port_info __initdata = {
+static const struct ide_port_info qd65xx_port_info __initconst = {
 	.name			= DRV_NAME,
 	.tp_ops 		= &qd65xx_tp_ops,
 	.chipset		= ide_qd65xx,
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index 7002765..91d49dd 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -117,7 +117,7 @@ static const struct ide_port_ops tx4938ide_port_ops = {
 	.set_pio_mode		= tx4938ide_set_pio_mode,
 };
 
-static const struct ide_port_info tx4938ide_port_info __initdata = {
+static const struct ide_port_info tx4938ide_port_info __initconst = {
 	.port_ops		= &tx4938ide_port_ops,
 #ifdef __BIG_ENDIAN
 	.tp_ops			= &tx4938ide_tp_ops,
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 71c2319..c0ab800 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -522,7 +522,7 @@ static const struct ide_dma_ops tx4939ide_dma_ops = {
 	.dma_sff_read_status	= tx4939ide_dma_sff_read_status,
 };
 
-static const struct ide_port_info tx4939ide_port_info __initdata = {
+static const struct ide_port_info tx4939ide_port_info __initconst = {
 	.init_hwif		= tx4939ide_init_hwif,
 	.init_dma		= tx4939ide_init_dma,
 	.port_ops		= &tx4939ide_port_ops,
diff --git a/drivers/ide/umc8672.c b/drivers/ide/umc8672.c
index 5cfb781..3aa0fea 100644
--- a/drivers/ide/umc8672.c
+++ b/drivers/ide/umc8672.c
@@ -128,7 +128,7 @@ static const struct ide_port_ops umc8672_port_ops = {
 	.set_pio_mode		= umc_set_pio_mode,
 };
 
-static const struct ide_port_info umc8672_port_info __initdata = {
+static const struct ide_port_info umc8672_port_info __initconst = {
 	.name			= DRV_NAME,
 	.chipset		= ide_umc8672,
 	.port_ops		= &umc8672_port_ops,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 13/15] media/video/s5p-tv: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (11 preceding siblings ...)
  2012-03-30 20:05 ` [PATCH v2 12/15] ide: " Uwe Kleine-König
@ 2012-03-30 20:05 ` Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 14/15] drivers/x86: " Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 15/15] kstrtox: " Uwe Kleine-König
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:05 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: kernel, Kyungmin Park, Tomasz Stanislawski,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-media

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 <u.kleine-koenig@pengutronix.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-media@vger.kernel.org
---
no changes since (implicit) v1

 drivers/media/video/s5p-tv/mixer_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/video/s5p-tv/mixer_drv.c b/drivers/media/video/s5p-tv/mixer_drv.c
index a2c0c25..edca065 100644
--- a/drivers/media/video/s5p-tv/mixer_drv.c
+++ b/drivers/media/video/s5p-tv/mixer_drv.c
@@ -461,7 +461,7 @@ static struct platform_driver mxr_driver __refdata = {
 static int __init mxr_init(void)
 {
 	int i, ret;
-	static const char banner[] __initdata = KERN_INFO
+	static const char banner[] __initconst = KERN_INFO
 		"Samsung TV Mixer driver, "
 		"(c) 2010-2011 Samsung Electronics Co., Ltd.\n";
 	printk(banner);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 14/15] drivers/x86: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (12 preceding siblings ...)
  2012-03-30 20:05 ` [PATCH v2 13/15] media/video/s5p-tv: " Uwe Kleine-König
@ 2012-03-30 20:05 ` Uwe Kleine-König
  2012-03-30 20:05 ` [PATCH v2 15/15] kstrtox: " Uwe Kleine-König
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:05 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: kernel, Matthew Garrett, Henrique de Moraes Holschuh,
	platform-driver-x86, ibm-acpi-devel

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 <u.kleine-koenig@pengutronix.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: platform-driver-x86@vger.kernel.org
Cc: ibm-acpi-devel@lists.sourceforge.net
---
changes since (implict) v1:
 - drop wrong changes to drivers/platform/x86/thinkpad_acpi.c

 drivers/platform/x86/dell-laptop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index a05fc9c..882bfa4 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -94,7 +94,7 @@ static struct rfkill *wifi_rfkill;
 static struct rfkill *bluetooth_rfkill;
 static struct rfkill *wwan_rfkill;
 
-static const struct dmi_system_id __initdata dell_device_table[] = {
+static const struct dmi_system_id dell_device_table[] __initconst = {
 	{
 		.ident = "Dell laptop",
 		.matches = {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 15/15] kstrtox: mark const init data with __initconst instead of __initdata
       [not found] <20120330200358.GV15647@pengutronix.de>
                   ` (13 preceding siblings ...)
  2012-03-30 20:05 ` [PATCH v2 14/15] drivers/x86: " Uwe Kleine-König
@ 2012-03-30 20:05 ` Uwe Kleine-König
  14 siblings, 0 replies; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 20:05 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: kernel, Alexey Dobriyan

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 <u.kleine-koenig@pengutronix.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
---
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


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
  2012-03-30 20:04 ` [PATCH v2 05/15] hwmon: " Uwe Kleine-König
@ 2012-03-31  3:54   ` Guenter Roeck
  2012-03-31 14:09     ` Uwe Kleine-König
  0 siblings, 1 reply; 21+ messages in thread
From: Guenter Roeck @ 2012-03-31  3:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, Andrew Morton, kernel, Jean Delvare, lm-sensors

On Fri, Mar 30, 2012 at 04:04:55PM -0400, Uwe Kleine-König wrote:
> 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 <u.kleine-koenig@pengutronix.de>
> Cc: Jean Delvare <khali@linux-fr.org>
> Cc: Guenter Roeck <guenter.roeck@ericsson.com>
> Cc: lm-sensors@lm-sensors.org
> ---
> changes since (implicit) v1:
>  - drop wrong changes to drivers/hwmon/w83627hf.c
> 
>  drivers/hwmon/w83627ehf.c |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> index a25350c..54922ed 100644
> --- a/drivers/hwmon/w83627ehf.c
> +++ b/drivers/hwmon/w83627ehf.c
> @@ -2619,15 +2619,15 @@ static struct platform_driver w83627ehf_driver = {
>  static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
>  				 struct w83627ehf_sio_data *sio_data)
>  {
> -	static const char __initdata sio_name_W83627EHF[] = "W83627EHF";
> -	static const char __initdata sio_name_W83627EHG[] = "W83627EHG";
> -	static const char __initdata sio_name_W83627DHG[] = "W83627DHG";
> -	static const char __initdata sio_name_W83627DHG_P[] = "W83627DHG-P";
> -	static const char __initdata sio_name_W83627UHG[] = "W83627UHG";
> -	static const char __initdata sio_name_W83667HG[] = "W83667HG";
> -	static const char __initdata sio_name_W83667HG_B[] = "W83667HG-B";
> -	static const char __initdata sio_name_NCT6775[] = "NCT6775F";
> -	static const char __initdata sio_name_NCT6776[] = "NCT6776F";
> +	static const char sio_name_W83627EHF[] __initconst = "W83627EHF";
> +	static const char sio_name_W83627EHG[] __initconst = "W83627EHG";
> +	static const char sio_name_W83627DHG[] __initconst = "W83627DHG";
> +	static const char sio_name_W83627DHG_P[] __initconst = "W83627DHG-P";
> +	static const char sio_name_W83627UHG[] __initconst = "W83627UHG";
> +	static const char sio_name_W83667HG[] __initconst = "W83667HG";
> +	static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B";
> +	static const char sio_name_NCT6775[] __initconst = "NCT6775F";
> +	static const char sio_name_NCT6776[] __initconst = "NCT6776F";
>  
Applied.

Just wondering: Why not the following ?

> +	static const char __initconst sio_name_NCT6776[] = "NCT6776F";

It does not make a difference in the generated code, and appears to be
less confusing, at least to me.

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
  2012-03-31  3:54   ` Guenter Roeck
@ 2012-03-31 14:09     ` Uwe Kleine-König
  2012-03-31 20:14       ` Guenter Roeck
  0 siblings, 1 reply; 21+ messages in thread
From: Uwe Kleine-König @ 2012-03-31 14:09 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, Andrew Morton, kernel, Jean Delvare, lm-sensors

Hello Guenter,

On Fri, Mar 30, 2012 at 08:54:42PM -0700, Guenter Roeck wrote:
> On Fri, Mar 30, 2012 at 04:04:55PM -0400, Uwe Kleine-König wrote:
> > 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 <u.kleine-koenig@pengutronix.de>
> > Cc: Jean Delvare <khali@linux-fr.org>
> > Cc: Guenter Roeck <guenter.roeck@ericsson.com>
> > Cc: lm-sensors@lm-sensors.org
> > ---
> > changes since (implicit) v1:
> >  - drop wrong changes to drivers/hwmon/w83627hf.c
> > 
> >  drivers/hwmon/w83627ehf.c |   18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> > index a25350c..54922ed 100644
> > --- a/drivers/hwmon/w83627ehf.c
> > +++ b/drivers/hwmon/w83627ehf.c
> > @@ -2619,15 +2619,15 @@ static struct platform_driver w83627ehf_driver = {
> >  static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
> >  				 struct w83627ehf_sio_data *sio_data)
> >  {
> > -	static const char __initdata sio_name_W83627EHF[] = "W83627EHF";
> > -	static const char __initdata sio_name_W83627EHG[] = "W83627EHG";
> > -	static const char __initdata sio_name_W83627DHG[] = "W83627DHG";
> > -	static const char __initdata sio_name_W83627DHG_P[] = "W83627DHG-P";
> > -	static const char __initdata sio_name_W83627UHG[] = "W83627UHG";
> > -	static const char __initdata sio_name_W83667HG[] = "W83667HG";
> > -	static const char __initdata sio_name_W83667HG_B[] = "W83667HG-B";
> > -	static const char __initdata sio_name_NCT6775[] = "NCT6775F";
> > -	static const char __initdata sio_name_NCT6776[] = "NCT6776F";
> > +	static const char sio_name_W83627EHF[] __initconst = "W83627EHF";
> > +	static const char sio_name_W83627EHG[] __initconst = "W83627EHG";
> > +	static const char sio_name_W83627DHG[] __initconst = "W83627DHG";
> > +	static const char sio_name_W83627DHG_P[] __initconst = "W83627DHG-P";
> > +	static const char sio_name_W83627UHG[] __initconst = "W83627UHG";
> > +	static const char sio_name_W83667HG[] __initconst = "W83667HG";
> > +	static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B";
> > +	static const char sio_name_NCT6775[] __initconst = "NCT6775F";
> > +	static const char sio_name_NCT6776[] __initconst = "NCT6776F";
> >  
> Applied.
> 
> Just wondering: Why not the following ?
> 
> > +	static const char __initconst sio_name_NCT6776[] = "NCT6776F";
> 
> It does not make a difference in the generated code, and appears to be
> less confusing, at least to me.
hmm, I thought it does, maybe it's compiler dependant?! At least
gcc-4.4.info tells:

	An attribute specifier list may appear immediately before the
	comma, `=' or semicolon terminating the declaration of an
	identifier other than a function definition.

and include/linux/init.h has:

	You should insert __initdata between the variable name and equal
	sign followed by value [...].

I seem to remember that placing the attribute at the wrong place for a
function made gcc ignore it (or apply it so something unintended).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
  2012-03-31 14:09     ` Uwe Kleine-König
@ 2012-03-31 20:14       ` Guenter Roeck
  0 siblings, 0 replies; 21+ messages in thread
From: Guenter Roeck @ 2012-03-31 20:14 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, Andrew Morton, kernel, Jean Delvare, lm-sensors

On Sat, Mar 31, 2012 at 10:09:24AM -0400, Uwe Kleine-König wrote:
> Hello Guenter,
> 
> On Fri, Mar 30, 2012 at 08:54:42PM -0700, Guenter Roeck wrote:
> > On Fri, Mar 30, 2012 at 04:04:55PM -0400, Uwe Kleine-König wrote:
> > > 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 <u.kleine-koenig@pengutronix.de>
> > > Cc: Jean Delvare <khali@linux-fr.org>
> > > Cc: Guenter Roeck <guenter.roeck@ericsson.com>
> > > Cc: lm-sensors@lm-sensors.org
> > > ---
> > > changes since (implicit) v1:
> > >  - drop wrong changes to drivers/hwmon/w83627hf.c
> > > 
> > >  drivers/hwmon/w83627ehf.c |   18 +++++++++---------
> > >  1 file changed, 9 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> > > index a25350c..54922ed 100644
> > > --- a/drivers/hwmon/w83627ehf.c
> > > +++ b/drivers/hwmon/w83627ehf.c
> > > @@ -2619,15 +2619,15 @@ static struct platform_driver w83627ehf_driver = {
> > >  static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
> > >  				 struct w83627ehf_sio_data *sio_data)
> > >  {
> > > -	static const char __initdata sio_name_W83627EHF[] = "W83627EHF";
> > > -	static const char __initdata sio_name_W83627EHG[] = "W83627EHG";
> > > -	static const char __initdata sio_name_W83627DHG[] = "W83627DHG";
> > > -	static const char __initdata sio_name_W83627DHG_P[] = "W83627DHG-P";
> > > -	static const char __initdata sio_name_W83627UHG[] = "W83627UHG";
> > > -	static const char __initdata sio_name_W83667HG[] = "W83667HG";
> > > -	static const char __initdata sio_name_W83667HG_B[] = "W83667HG-B";
> > > -	static const char __initdata sio_name_NCT6775[] = "NCT6775F";
> > > -	static const char __initdata sio_name_NCT6776[] = "NCT6776F";
> > > +	static const char sio_name_W83627EHF[] __initconst = "W83627EHF";
> > > +	static const char sio_name_W83627EHG[] __initconst = "W83627EHG";
> > > +	static const char sio_name_W83627DHG[] __initconst = "W83627DHG";
> > > +	static const char sio_name_W83627DHG_P[] __initconst = "W83627DHG-P";
> > > +	static const char sio_name_W83627UHG[] __initconst = "W83627UHG";
> > > +	static const char sio_name_W83667HG[] __initconst = "W83667HG";
> > > +	static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B";
> > > +	static const char sio_name_NCT6775[] __initconst = "NCT6775F";
> > > +	static const char sio_name_NCT6776[] __initconst = "NCT6776F";
> > >  
> > Applied.
> > 
> > Just wondering: Why not the following ?
> > 
> > > +	static const char __initconst sio_name_NCT6776[] = "NCT6776F";
> > 
> > It does not make a difference in the generated code, and appears to be
> > less confusing, at least to me.
> hmm, I thought it does, maybe it's compiler dependant?! At least
> gcc-4.4.info tells:
> 
> 	An attribute specifier list may appear immediately before the
> 	comma, `=' or semicolon terminating the declaration of an
> 	identifier other than a function definition.
> 
I tried with gcc 4.4.3; it did not make a difference.

> and include/linux/init.h has:
> 
> 	You should insert __initdata between the variable name and equal
> 	sign followed by value [...].
> 
Seems to be a clear statement.

> I seem to remember that placing the attribute at the wrong place for a
> function made gcc ignore it (or apply it so something unintended).
> 
Apparently not for gcc 4.4.3, but possibly for others.

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata
  2012-03-30 20:04 ` [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata Uwe Kleine-König
@ 2012-04-03 20:47   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2012-04-03 20:47 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel, Andrew Morton, kernel, Randy Dunlap

2012/3/30 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

> changes since (implict) v1:
>  - move __initconst after variable name

Bah, applied this instead of v1.

Thanks,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 02/15] ARM: mark const init data with __initconst instead of __initdata
  2012-03-30 20:04 ` [PATCH v2 02/15] ARM: " Uwe Kleine-König
@ 2012-04-11 11:34   ` Sekhar Nori
  0 siblings, 0 replies; 21+ messages in thread
From: Sekhar Nori @ 2012-04-11 11:34 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor,
	Nicolas Ferre, Jean-Christophe Plagniol-Villard, Russell King,
	Kevin Hilman, Kukjin Kim, Shawn Guo, Lennert Buytenhek,
	Nicolas Pitre, Eric Miao, Haojian Zhuang, David Brown,
	Daniel Walker, Bryan Huntsman, Tony Lindgren, Barry Song,
	Andrew Lunn, Lucas De Marchi, linux-arm-kernel,
	davinci-linux-open-source, linux-samsung-soc, linux-arm-msm,
	linux-omap

Hi Uwe,

On 3/31/2012 1:34 AM, Uwe Kleine-König wrote:
> 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 <u.kleine-koenig@pengutronix.de>

For the DaVinci parts,

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 06/15] mfd: mark const init data with __initconst instead of __initdata
  2012-03-30 20:04 ` [PATCH v2 06/15] mfd: " Uwe Kleine-König
@ 2012-04-16 10:30   ` Samuel Ortiz
  0 siblings, 0 replies; 21+ messages in thread
From: Samuel Ortiz @ 2012-04-16 10:30 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel, Andrew Morton, kernel

Hi Uwe,

On Fri, Mar 30, 2012 at 10:04:56PM +0200, Uwe Kleine-König wrote:
> 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 <u.kleine-koenig@pengutronix.de>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
Patch applied, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-04-16 10:21 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20120330200358.GV15647@pengutronix.de>
2012-03-30 20:04 ` [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata Uwe Kleine-König
2012-04-03 20:47   ` Linus Walleij
2012-03-30 20:04 ` [PATCH v2 02/15] ARM: " Uwe Kleine-König
2012-04-11 11:34   ` Sekhar Nori
2012-03-30 20:04 ` [PATCH v2 03/15] FRV: " Uwe Kleine-König
2012-03-30 20:04 ` [PATCH v2 04/15] net: " Uwe Kleine-König
2012-03-30 20:04 ` [PATCH v2 05/15] hwmon: " Uwe Kleine-König
2012-03-31  3:54   ` Guenter Roeck
2012-03-31 14:09     ` Uwe Kleine-König
2012-03-31 20:14       ` Guenter Roeck
2012-03-30 20:04 ` [PATCH v2 06/15] mfd: " Uwe Kleine-König
2012-04-16 10:30   ` Samuel Ortiz
2012-03-30 20:04 ` [PATCH v2 07/15] mips: " Uwe Kleine-König
2012-03-30 20:04 ` [PATCH v2 08/15] h8300: " Uwe Kleine-König
2012-03-30 20:04 ` [PATCH v2 09/15] ia64: " Uwe Kleine-König
2012-03-30 20:05 ` [PATCH v2 10/15] powerpc: " Uwe Kleine-König
2012-03-30 20:05 ` [PATCH v2 11/15] gpio/samsung: " Uwe Kleine-König
2012-03-30 20:05 ` [PATCH v2 12/15] ide: " Uwe Kleine-König
2012-03-30 20:05 ` [PATCH v2 13/15] media/video/s5p-tv: " Uwe Kleine-König
2012-03-30 20:05 ` [PATCH v2 14/15] drivers/x86: " Uwe Kleine-König
2012-03-30 20:05 ` [PATCH v2 15/15] kstrtox: " Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).