mark const init data with __initconst instead of __initdata
Subsystems (30)
cover mark const init data with __initconst instead of __initdata
Hello,
this series fixes a common error to use __initdata to mark const variables. Most of the time this works well enough to go unnoticed (though I wonder why the linker doesn't warn about that). Just try adding something like
int something __initdata;
to one of the patched files and compile to see the error.
While touching these annotations I also corrected the position where it was wrong to go between the variable name and the =.
Note this series is not compile tested.
Best regards
Uwe
Signature · 6 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 3/17 ARM: mark const init data with __initconst instead of __initdata
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.
--- arch/arm/mach-at91/board-dt.c | 2 +- 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-exynos/mach-exynos4-dt.c | 2 +- arch/arm/mach-exynos/mach-exynos5-dt.c | 2 +- arch/arm/mach-imx/imx27-dt.c | 2 +- arch/arm/mach-imx/imx51-dt.c | 2 +- arch/arm/mach-imx/imx53-dt.c | 2 +- arch/arm/mach-imx/mach-imx6q.c | 2 +- arch/arm/mach-kirkwood/addr-map.c | 2 +- arch/arm/mach-mmp/mmp-dt.c | 2 +- arch/arm/mach-msm/board-msm8x60.c | 2 +- arch/arm/mach-msm/board-qsd8x50.c | 4 +- arch/arm/mach-omap2/board-generic.c | 8 ++-- arch/arm/mach-omap2/display.c | 6 ++-- arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +- arch/arm/mach-omap2/voltagedomains44xx_data.c | 2 +- arch/arm/mach-orion5x/addr-map.c | 2 +- arch/arm/mach-prima2/prima2.c | 2 +- 22 files changed, 55 insertions(+), 55 deletions(-)
arch/arm/mach-at91/board-dt.c +1 -1
@@ -48,7 +48,7 @@ static void __init at91_dt_device_init(void)of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); } -static const char *at91_dt_board_compat[]__initdata = { +static const char *at91_dt_board_compat[]__initconst = {"atmel,at91sam9m10g45ek" ,"atmel,at91sam9x5ek" ,"calao,usb-a9g20" ,
arch/arm/mach-at91/clock.c +1 -1
@@ -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,
arch/arm/mach-davinci/board-tnetv107x-evm.c +3 -3
@@ -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
arch/arm/mach-davinci/da830.c +24 -24
168 lines not on this page · raw message
arch/arm/mach-davinci/da850.c +3 -3
@@ -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 ,
arch/arm/mach-dove/addr-map.c +1 -1
@@ -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. */
arch/arm/mach-exynos/mach-exynos4-dt.c +1 -1
@@ -72,7 +72,7 @@ static void __init exynos4210_dt_machine_init(void) exynos4210_auxdata_lookup, NULL); } -static char const *exynos4210_dt_compat[]__initdata = { +static char const *exynos4210_dt_compat[]__initconst = {"samsung,exynos4210" ,NULL };
arch/arm/mach-exynos/mach-exynos5-dt.c +1 -1
@@ -61,7 +61,7 @@ static void __init exynos5250_dt_machine_init(void) exynos5250_auxdata_lookup, NULL); } -static char const *exynos5250_dt_compat[]__initdata = { +static char const *exynos5250_dt_compat[]__initconst = {"samsung,exynos5250" ,NULL };
arch/arm/mach-imx/imx27-dt.c +1 -1
@@ -72,7 +72,7 @@ static struct sys_timer imx27_timer = { .init = imx27_timer_init, }; -static const char *imx27_dt_board_compat[]__initdata = { +static const char *imx27_dt_board_compat[]__initconst = {"fsl,imx27" ,NULL };
arch/arm/mach-imx/imx51-dt.c +1 -1
@@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = { .init = imx51_timer_init, }; -static const char *imx51_dt_board_compat[]__initdata = { +static const char *imx51_dt_board_compat[]__initconst = {"fsl,imx51-babbage" ,"fsl,imx51" ,NULL
arch/arm/mach-imx/imx53-dt.c +1 -1
@@ -109,7 +109,7 @@ static struct sys_timer imx53_timer = { .init = imx53_timer_init, }; -static const char *imx53_dt_board_compat[]__initdata = { +static const char *imx53_dt_board_compat[]__initconst = {"fsl,imx53-ard" ,"fsl,imx53-evk" ,"fsl,imx53-qsb" ,
arch/arm/mach-imx/mach-imx6q.c +1 -1
@@ -129,7 +129,7 @@ static struct sys_timer imx6q_timer = { .init = imx6q_timer_init, }; -static const char *imx6q_dt_compat[]__initdata = { +static const char *imx6q_dt_compat[]__initconst = {"fsl,imx6q-arm2" ,"fsl,imx6q-sabrelite" ,"fsl,imx6q" ,
arch/arm/mach-kirkwood/addr-map.c +1 -1
@@ -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 __initconst orion_addr_map_info addr_map_info[] = {/* * Windows for PCIe IO+MEM space. */
arch/arm/mach-mmp/mmp-dt.c +1 -1
@@ -61,7 +61,7 @@ static void __init mmp_dt_init(void) mmp_auxdata_lookup, NULL); } -static const char *pxa168_dt_board_compat[]__initdata = { +static const char *pxa168_dt_board_compat[]__initconst = {"mrvl,pxa168-aspenite" ,NULL , };
arch/arm/mach-msm/board-msm8x60.c +1 -1
@@ -92,7 +92,7 @@ static void __init msm8x60_dt_init(void) msm_auxdata_lookup, NULL); } -static const char *msm8x60_fluid_match[]__initdata = { +static const char *msm8x60_fluid_match[]__initconst = {"qcom,msm8660-fluid" ,"qcom,msm8660-surf" ,NULL
arch/arm/mach-msm/board-qsd8x50.c +2 -2
@@ -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
arch/arm/mach-omap2/board-generic.c +4 -4
@@ -57,7 +57,7 @@ static void __init omap_generic_init(void) }#ifdef CONFIG_SOC_OMAP2420 -static const char *omap242x_boards_compat[]__initdata = { +static const char *omap242x_boards_compat[]__initconst = {"ti,omap2420" ,NULL , };
@@ -76,7 +76,7 @@ MACHINE_END#endif #ifdef CONFIG_SOC_OMAP2430 -static const char *omap243x_boards_compat[]__initdata = { +static const char *omap243x_boards_compat[]__initconst = {"ti,omap2430" ,NULL , };
@@ -111,7 +111,7 @@ static void __init omap3_init(void)omap_generic_init (); } -static const char *omap3_boards_compat[]__initdata = { +static const char *omap3_boards_compat[]__initconst = {"ti,omap3" ,NULL , };
@@ -146,7 +146,7 @@ static void __init omap4_init(void)omap_generic_init (); } -static const char *omap4_boards_compat[]__initdata = { +static const char *omap4_boards_compat[]__initconst = {"ti,omap4" ,NULL , };
arch/arm/mach-omap2/display.c +3 -3
@@ -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 },
arch/arm/mach-omap2/voltagedomains3xxx_data.c +1 -1
@@ -96,7 +96,7 @@ static struct voltagedomain *voltagedomains_am35xx[] __initdata = { }; -static const char *sys_clk_name__initdata ="sys_ck" ; +static const char *sys_clk_name__initconst ="sys_ck" ;void __init omap3xxx_voltagedomains_init (void ) {
arch/arm/mach-omap2/voltagedomains44xx_data.c +1 -1
@@ -89,7 +89,7 @@ static struct voltagedomain *voltagedomains_omap4[] __initdata = { NULL, }; -static const char *sys_clk_name__initdata ="sys_clkin_ck" ; +static const char *sys_clk_name__initconst ="sys_clkin_ck" ;void __init omap44xx_voltagedomains_init (void ) {
arch/arm/mach-orion5x/addr-map.c +1 -1
@@ -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 __initconst orion_addr_map_info addr_map_info[] = {/* * Setup windows for PCI+PCIe IO+MEM space. */
arch/arm/mach-prima2/prima2.c +1 -1
@@ -25,7 +25,7 @@ void __init sirfsoc_mach_init(void)of_platform_bus_probe (NULL , sirfsoc_of_bus_ids,NULL ); } -static const char *prima2cb_dt_match[]__initdata = { +static const char *prima2cb_dt_match[]__initconst = {"sirf,prima2-cb" ,NULL };
Signature · 1 line
1.7.9.1
PATCH 5/17 net: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- drivers/net/ethernet/8390/ne3210.c | 2 +- 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 +- 8 files changed, 10 insertions(+), 10 deletions(-)
drivers/net/ethernet/8390/ne3210.c +1 -1
@@ -81,7 +81,7 @@ static void ne3210_block_output(struct net_device *dev, int count, const unsignestatic unsigned char irq_map[]__initdata = {15 ,12 ,11 ,10 ,9 ,7 ,5 ,3 };static unsigned int shmem_map[]__initdata = {0xff0 ,0xfe0 ,0xfff0 ,0xd8 ,0xffe0 ,0xffc0 ,0xd0 ,0x0 }; -static const char *ifmap[]__initdata = {"UTP" ,"?" ,"BNC" ,"AUI" }; +static const char *ifmap[]__initconst = {"UTP" ,"?" ,"BNC" ,"AUI" };static int ifmap_val[]__initdata = {IF_PORT_10BASET ,IF_PORT_UNKNOWN ,
drivers/net/hamradio/6pack.c +2 -2
@@ -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 )
drivers/net/hamradio/bpqether.c +1 -1
@@ -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 };
drivers/net/hamradio/mkiss.c +2 -2
@@ -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 )
drivers/net/hamradio/scc.c +1 -1
@@ -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 );
drivers/net/hamradio/yam.c +1 -1
@@ -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" ;/* --------------------------------------------------------------------- */
drivers/net/tokenring/smctr.c +1 -1
@@ -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 [email protected]\n" ;static const char cardname[] ="smctr" ;
drivers/net/wan/z85230.c +1 -1
@@ -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 )
Signature · 6 lines
1.7.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 6/17 hwmon: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQXMgbG9uZyBhcyB0aGVyZSBpcyBubyBvdGhlciBub24tY29uc3QgdmFyaWFibGUgbWFya2VkIF9f aW5pdGRhdGEgaW4gdGhlCnNhbWUgY29tcGlsYXRpb24gdW5pdCBpdCBkb2Vzbid0IGh1cnQuIElm IHRoZXJlIHdlcmUgb25lIGhvd2V2ZXIKY29tcGlsY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RhIGNo YXIgKm5hbWVzW10gPSB7CisJc3RhdGljIGNvbnN0IGNoYXIgKm5hbWVzW10gX19pbml0Y29uc3Qg PSB7CiAJCSJXODM2MjdIRiIsCiAJCSJXODM2MjdUSEYiLAogCQkiVzgzNjk3SEYiLAotLSAKMS43 LjkuMQoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmxt LXNlbnNvcnMgbWFpbGluZyBsaXN0CmxtLXNlbnNvcnNAbG0tc2Vuc29ycy5vcmcKaHR0cDovL2xp c3RzLmxtLXNlbnNvcnMub3JnL21haWxtYW4vbGlzdGluZm8vbG0tc2Vuc29ycw=
PATCH 10/17 ia64: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- arch/ia64/xen/irq_xen.c | 2 +- arch/ia64/xen/irq_xen.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/ia64/xen/irq_xen.c +1 -1
@@ -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,
arch/ia64/xen/irq_xen.h +1 -1
@@ -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);
Signature · 1 line
1.7.9.1
PATCH 14/17 media/video/s5p-tv: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- drivers/media/video/s5p-tv/mixer_drv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/s5p-tv/mixer_drv.c +1 -1
@@ -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);
Signature · 1 line
1.7.9.1
PATCH 1/17 percpu: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- mm/percpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
mm/percpu.c +1 -1
@@ -1370,7 +1370,7 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,#ifdef CONFIG_SMP -const char *pcpu_fc_names[PCPU_FC_NR ]__initdata = { +const char *pcpu_fc_names[PCPU_FC_NR ]__initconst = { [PCPU_FC_AUTO ] ="auto" , [PCPU_FC_EMBED ] ="embed" , [PCPU_FC_PAGE] = "page",
Signature · 8 lines
1.7.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 13/17 ide: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- 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(-)
drivers/ide/ali14xx.c +2 -2
@@ -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 },
drivers/ide/cmd640.c +1 -1
@@ -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 |
drivers/ide/dtc2278.c +1 -1
@@ -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,
drivers/ide/ht6560b.c +1 -1
@@ -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,
drivers/ide/icside.c +1 -1
@@ -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,
drivers/ide/qd65xx.c +1 -1
@@ -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,
drivers/ide/tx4938ide.c +1 -1
@@ -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,
drivers/ide/tx4939ide.c +1 -1
@@ -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,
drivers/ide/umc8672.c +1 -1
@@ -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,
Signature · 1 line
1.7.9.1
PATCH 16/17 drivers/x86: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- drivers/platform/x86/dell-laptop.c | 2 +- drivers/platform/x86/thinkpad_acpi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/dell-laptop.c +1 -1
@@ -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 = {
drivers/platform/x86/thinkpad_acpi.c +1 -1
@@ -522,7 +522,7 @@ static acpi_handle ec_handle; #define TPACPI_HANDLE(object, parent, paths...) \ static acpi_handle object##_handle; \ - static const acpi_handle *object##_parent __initdata = \ + static const acpi_handle *object##_parent __initconst = \ &parent##_handle; \ static char *object##_paths[] __initdata = { paths }
Signature · 1 line
1.7.9.1
PATCH 15/17 mtd: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- drivers/mtd/maps/wr_sbc82xx_flash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/maps/wr_sbc82xx_flash.c +1 -1
@@ -59,7 +59,7 @@ static struct mtd_partition bigflash_parts[] = { } }; -static const char *part_probes[]__initdata = {"cmdlinepart" ,"RedBoot" ,NULL }; +static const char *part_probes[]__initconst = {"cmdlinepart" ,"RedBoot" ,NULL };#define init_sbc82xx_one_flash (map, br, or) \ do { \
Signature · 1 line
1.7.9.1
PATCH 9/17 h8300: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- 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(-)
arch/h8300/kernel/timer/itu.c +1 -1
@@ -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 ) {
arch/h8300/kernel/timer/timer16.c +1 -1
@@ -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 ) {
arch/h8300/kernel/timer/timer8.c +1 -1
@@ -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 ) {
arch/h8300/kernel/timer/tpu.c +1 -1
@@ -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)
arch/h8300/platform/h8300h/irq.c +2 -2
@@ -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,
arch/h8300/platform/h8s/irq.c +2 -2
@@ -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 ,
Signature · 1 line
1.7.9.1
PATCH 12/17 gpio/samsung: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- drivers/gpio/gpio-samsung.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpio/gpio-samsung.c +1 -1
@@ -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" , }, {} };
Signature · 1 line
1.7.9.1
PATCH 8/17 mips: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- 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 +- 8 files changed, 10 insertions(+), 10 deletions(-)
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -1
@@ -591,7 +591,7 @@ static struct board_info __initdata board_DWVS0 = {/* * all boards */ -static const struct board_info __initdata *bcm963xx_boards[] = { +static const struct board_info *bcm963xx_boards[]__initconst = { #ifdef CONFIG_BCM63XX_CPU_6338 &board_96338gw, &board_96338w,
arch/mips/bcm63xx/dev-pcmcia.c +2 -2
@@ -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 ,
arch/mips/mti-malta/malta-setup.c +1 -1
@@ -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];
arch/mips/pci/fixup-mpc30x.c +2 -2
@@ -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 ,
arch/mips/powertv/asic/asic-calliope.c +1 -1
@@ -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 )},
arch/mips/powertv/asic/asic-cronus.c +1 -1
@@ -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 )},
arch/mips/powertv/asic/asic-gaia.c +1 -1
@@ -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 },
arch/mips/powertv/asic/asic-zeus.c +1 -1
@@ -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 )},
Signature · 1 line
1.7.9.1
PATCH 11/17 powerpc: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- arch/powerpc/platforms/40x/ppc40x_simple.c | 2 +- arch/powerpc/platforms/512x/mpc5121_generic.c | 2 +- arch/powerpc/platforms/52xx/lite5200.c | 2 +- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc5200_simple.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pci.c | 2 +- arch/powerpc/platforms/83xx/mpc830x_rdb.c | 2 +- arch/powerpc/platforms/83xx/mpc831x_rdb.c | 2 +- arch/powerpc/platforms/83xx/mpc837x_rdb.c | 2 +- arch/powerpc/platforms/85xx/tqm85xx.c | 2 +- arch/powerpc/platforms/cell/qpace_setup.c | 2 +- arch/powerpc/platforms/cell/setup.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
arch/powerpc/platforms/40x/ppc40x_simple.c +1 -1
@@ -50,7 +50,7 @@ machine_device_initcall(ppc40x_simple, ppc40x_device_probe);* Again, if your board needs to do things differently then create a * board.c file for it rather than adding it to this list. */ -static const char *board[]__initdata = { +static const char *board[]__initconst = {"amcc,acadia" ,"amcc,haleakala" ,"amcc,kilauea" ,
arch/powerpc/platforms/512x/mpc5121_generic.c +1 -1
@@ -26,7 +26,7 @@/* * list of supported boards */ -static const char *board[]__initdata = { +static const char *board[]__initconst = {"prt,prtlvt" ,NULL };
arch/powerpc/platforms/52xx/lite5200.c +1 -1
@@ -172,7 +172,7 @@ static void __init lite5200_setup_arch(void)mpc52xx_setup_pci (); } -static const char *board[]__initdata = { +static const char *board[]__initconst = {"fsl,lite5200" ,"fsl,lite5200b" ,NULL ,
arch/powerpc/platforms/52xx/media5200.c +1 -1
@@ -232,7 +232,7 @@ static void __init media5200_setup_arch(void) }/* list of the supported boards */ -static const char *board[]__initdata = { +static const char *board[]__initconst = {"fsl,media5200" ,NULL };
arch/powerpc/platforms/52xx/mpc5200_simple.c +1 -1
@@ -49,7 +49,7 @@ static void __init mpc5200_simple_setup_arch(void) }/* list of the supported boards */ -static const char *board[]__initdata = { +static const char *board[]__initconst = {"anonymous,a4m072" ,"anon,charon" ,"intercontrol,digsy-mtc" ,
arch/powerpc/platforms/52xx/mpc52xx_pci.c +1 -1
@@ -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" , }, {}
arch/powerpc/platforms/83xx/mpc830x_rdb.c +1 -1
@@ -34,7 +34,7 @@ static void __init mpc830x_rdb_setup_arch(void)mpc831x_usb_cfg (); } -static const char *board[]__initdata = { +static const char *board[]__initconst = {"MPC8308RDB" ,"fsl,mpc8308rdb" ,"denx,mpc8308_p1m" ,
arch/powerpc/platforms/83xx/mpc831x_rdb.c +1 -1
@@ -35,7 +35,7 @@ static void __init mpc831x_rdb_setup_arch(void)mpc831x_usb_cfg (); } -static const char *board[]__initdata = { +static const char *board[]__initconst = {"MPC8313ERDB" ,"fsl,mpc8315erdb" ,NULL
arch/powerpc/platforms/83xx/mpc837x_rdb.c +1 -1
@@ -60,7 +60,7 @@ static void __init mpc837x_rdb_setup_arch(void)machine_device_initcall (mpc837x_rdb, mpc83xx_declare_of_platform_devices); -static const char *board[]__initdata = { +static const char *board[]__initconst = {"fsl,mpc8377rdb" ,"fsl,mpc8378rdb" ,"fsl,mpc8379rdb" ,
arch/powerpc/platforms/85xx/tqm85xx.c +1 -1
@@ -125,7 +125,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520,machine_device_initcall (tqm85xx, mpc85xx_common_publish_devices); -static const char *board[]__initdata = { +static const char *board[]__initconst = {"tqc,tqm8540" ,"tqc,tqm8541" ,"tqc,tqm8548" ,
arch/powerpc/platforms/cell/qpace_setup.c +1 -1
@@ -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" , },
arch/powerpc/platforms/cell/setup.c +1 -1
@@ -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" , },
Signature · 1 line
1.7.9.1
PATCH 7/17 mfd: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- drivers/mfd/ab5500-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/ab5500-core.c +1 -1
@@ -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 ,
Signature · 1 line
1.7.9.1
PATCH 2/17 pinctrl: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- Documentation/pinctrl.txt | 2 +- drivers/pinctrl/pinctrl-coh901.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/pinctrl.txt +1 -1
@@ -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 __initconst mapping[] = { { .dev_name = "foo-spi.0", .name = PINCTRL_STATE_DEFAULT,
drivers/pinctrl/pinctrl-coh901.c +2 -2
@@ -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 */ {
Signature · 1 line
1.7.9.1
PATCH 17/17 kstrtox: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- lib/test-kstrtox.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
lib/test-kstrtox.c +2 -2
@@ -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) \ { \
Signature · 1 line
1.7.9.1
PATCH 4/17 FRV: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
--- arch/frv/mb93090-mb00/pci-irq.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/frv/mb93090-mb00/pci-irq.c +1 -1
@@ -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 },
Signature · 1 line
1.7.9.1
Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQuoted 2 lines · Uwe Kleine-K?nig
arch/arm/mach-msm/board-msm8x60.c | 2 +- arch/arm/mach-msm/board-qsd8x50.c | 4 +-
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQuoted 35 lines · Uwe Kleine-K?nig
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $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 <[email protected]>Cc Andrew Victor <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Jean-Christophe Plagniol-Villard <[email protected]>Cc Russell King <[email protected]>Cc Sekhar Nori <[email protected]>Cc Kevin Hilman <[email protected]>Cc Kukjin Kim <[email protected]>Cc Sascha Hauer <[email protected]>Cc Shawn Guo <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Nicolas Pitre <[email protected]>Cc Eric Miao <[email protected]>Cc Haojian Zhuang <[email protected]>Cc David Brown <[email protected]>Cc Daniel Walker <[email protected]>Cc Bryan Huntsman <[email protected]>Cc Tony Lindgren <[email protected]>Cc Barry Song <[email protected]>Cc Andrew Lunn <[email protected]>Cc Lucas De Marchi <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc davinci-linux-open-source at linux.davincidsp.comCc linux-samsung-soc at vger.kernel.orgCc linux-arm-msm at vger.kernel.orgCc linux-omap at vger.kernel.org
Quoted 3 lines
--- arch/arm/mach-at91/board-dt.c | 2 +- arch/arm/mach-at91/clock.c | 2 +-
for at91
Best Regards,
J.
Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigOn Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-K?nig wrote:
...
arch/arm/mach-imx/imx51-dt.c static struct sys_timer imx51_timer = { · line 108
Quoted 13 lines
arch/arm/mach-imx/imx51-dt.c +1
-1@@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = { .init = imx51_timer_init, }; -static const char *imx51_dt_board_compat[]__initdata = { +static const char *imx51_dt_board_compat[]__initconst = {"fsl,imx51-babbage" ,"fsl,imx51" ,NULL
CC arch/arm/mach-imx/imx51-dt.oarch/arm/mach-imx/imx51-dt.c:105:20: error: imx51_dt_board_compat causes a section type conflict make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
I do not understand why though.
Signature · 2 lines
Regards, Shawn
Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
Hello Shawn,
Quoted 20 lines · Shawn Guo
On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-K?nig wrote:
...arch/arm/mach-imx/imx51-dt.c static struct sys_timer imx51_timer = { · line 108
Quoted 13 lines
arch/arm/mach-imx/imx51-dt.c +1
-1@@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = { .init = imx51_timer_init, }; -static const char *imx51_dt_board_compat[]__initdata = { +static const char *imx51_dt_board_compat[]__initconst = {"fsl,imx51-babbage" ,"fsl,imx51" ,NULL CC
arch/arm/mach-imx/imx51-dt.oarch/arm/mach-imx/imx51-dt.c:105:20: error:imx51_dt_board_compatcauses a section type conflict make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
Quoted 1 line
I do not understand why though.
that's because the strings are constant, but the array is not. The fix is:
-static const char *imx51_dt_board_compat[] __initconst = { +static const char *const imx51_dt_board_compat[] __initconst = {
or keeping __initdata.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Quoted 7 lines · Uwe Kleine-König
Hello,
this series fixes a common error to use
__initdatato mark const variables. Most of the time this works well enough to go unnoticed (though I wonder why the linker doesn't warn about that). Just try adding something like
Quoted 8 lines
int something __initdata;to one of the patched files and compile to see the error.
While touching these annotations I also corrected the position where it was wrong to go between the variable name and the =.
Note this series is not compile tested.
After a question by Shawn Guo I noticed that my command to do the changes was to lax and changed things that must not be changed (at least not with further care). Affected are lines like:
static const char *at91_dt_board_compat[] __initconst = {While at91_dt_board_compat[0] is const, at91_dt_board_compat is not.
I will send a fixed series later today.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQuoted 23 lines · Uwe Kleine-K?nig
Hello Shawn,
Quoted 20 lines · Shawn Guo
On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-K?nig wrote:
...arch/arm/mach-imx/imx51-dt.c static struct sys_timer imx51_timer = { · line 108
Quoted 13 lines
arch/arm/mach-imx/imx51-dt.c +1
-1@@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = { .init = imx51_timer_init, }; -static const char *imx51_dt_board_compat[]__initdata = { +static const char *imx51_dt_board_compat[]__initconst = {"fsl,imx51-babbage" ,"fsl,imx51" ,NULL CC
arch/arm/mach-imx/imx51-dt.oarch/arm/mach-imx/imx51-dt.c:105:20: error:imx51_dt_board_compatcauses a section type conflict make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
Quoted 2 lines
Quoted 1 line
I do not understand why though.
that's because the strings are constant, but the array is not.
Ah, yes. It indeed could be overlooked :)
Signature · 2 lines
Regards, Shawn
Quoted 7 lines · Uwe Kleine-König
After a question by Shawn Guo I noticed that my command to do the changes was to lax and changed things that must not be changed (at least not with further care). Affected are lines like:
static const char *at91_dt_board_compat[] __initconst = {While at91_dt_board_compat[0] is const,
at91_dt_board_compatis not.
Though it looks like at91_dt_board_compat should really be const (it is assigned to a const pointer, likewise for all other uses of struct machine_desc.dt_compat).
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQuoted 8 lines · Uwe Kleine-K?nig
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $variablename causes a section type conflict
because a section containing const variables is marked read only and so cannot contain non-const variables.
Hello Andreas,
Quoted 6 lines · Andreas Schwab
Quoted 4 lines · Uwe Kleine-König
After a question by Shawn Guo I noticed that my command to do the changes was to lax and changed things that must not be changed (at least not with further care). Affected are lines like:
Quoted 7 lines
Quoted 3 lines
static const char *at91_dt_board_compat[] __initconst = {While at91_dt_board_compat[0] is const,
at91_dt_board_compatis not.Though it looks like
at91_dt_board_compatshould really be const (it is assigned to a const pointer, likewise for all other uses of struct machine_desc.dt_compat).
Yeah, still for this series I will revert to static const char *at91_dt_board_compat[] __initdata to only have a single logical change.
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
v2 cover mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigHello,
Quoted 5 lines · Uwe Kleine-König
this series fixes a common error to use
__initdatato mark const variables. Most of the time this works well enough to go unnoticed (though I wonder why the linker doesn't warn about that). Just try adding something like
Quoted 8 lines
int something __initdata;to one of the patched files and compile to see the error.
While touching these annotations I also corrected the position where it was wrong to go between the variable name and the =.
Note this series is not compile tested.
I now dropped the wrong annotations. So two patches became obsolete (mtd and percpu). Note that I also dropped fixing the position of __initdata if changing it to __initconst was wrong. (I think if __initdata is placed before the variable name it doesn't have any effect.)
I didn't promote the Acks I got because all acked changes changed in v2.
For the details changed in each patch see the changelogs in the respective patch mails that I follow up to this mail.
Thanks
Uwe
Signature · 6 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH v2 2/15 ARM: mark const init data with __initconst instead of __initdata
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.
---
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(-)
arch/arm/mach-at91/clock.c +1 -1
@@ -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,
arch/arm/mach-davinci/board-tnetv107x-evm.c +3 -3
@@ -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
arch/arm/mach-davinci/da830.c +24 -24
168 lines not on this page · raw message
arch/arm/mach-davinci/da850.c +3 -3
@@ -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 ,
arch/arm/mach-dove/addr-map.c +1 -1
@@ -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. */
arch/arm/mach-kirkwood/addr-map.c +1 -1
@@ -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. */
arch/arm/mach-msm/board-qsd8x50.c +2 -2
@@ -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
arch/arm/mach-omap2/display.c +3 -3
@@ -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 },
arch/arm/mach-orion5x/addr-map.c +1 -1
@@ -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. */
Signature · 1 line
1.7.9.5
PATCH v2 4/15 net: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
drivers/net/hamradio/6pack.c +2 -2
@@ -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 )
drivers/net/hamradio/bpqether.c +1 -1
@@ -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 };
drivers/net/hamradio/mkiss.c +2 -2
@@ -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 )
drivers/net/hamradio/scc.c +1 -1
@@ -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 );
drivers/net/hamradio/yam.c +1 -1
@@ -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" ;/* --------------------------------------------------------------------- */
drivers/net/tokenring/smctr.c +1 -1
@@ -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 [email protected]\n" ;static const char cardname[] ="smctr" ;
drivers/net/wan/z85230.c +1 -1
@@ -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 )
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 5/15 hwmon: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQXMgbG9uZyBhcyB0a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3JnL21haWxtYW4vbGlzdGlu Zm8vbG0tc2Vuc29ycw=
PATCH v2 9/15 ia64: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
arch/ia64/xen/irq_xen.c +1 -1
@@ -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,
arch/ia64/xen/irq_xen.h +1 -1
@@ -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);
Signature · 1 line
1.7.9.5
PATCH v2 13/15 media/video/s5p-tv: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
no changes since (implicit) v1
drivers/media/video/s5p-tv/mixer_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/video/s5p-tv/mixer_drv.c +1 -1
@@ -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);
Signature · 1 line
1.7.9.5
PATCH v2 3/15 FRV: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
no changes since (implicit) v1
arch/frv/mb93090-mb00/pci-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/frv/mb93090-mb00/pci-irq.c +1 -1
@@ -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 },
Signature · 1 line
1.7.9.5
PATCH v2 10/15 powerpc: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
arch/powerpc/platforms/52xx/mpc52xx_pci.c +1 -1
@@ -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" , }, {}
arch/powerpc/platforms/cell/qpace_setup.c +1 -1
@@ -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" , },
arch/powerpc/platforms/cell/setup.c +1 -1
@@ -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" , },
Signature · 1 line
1.7.9.5
PATCH v2 1/15 pinctrl: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
Documentation/pinctrl.txt +1 -1
@@ -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,
drivers/pinctrl/pinctrl-coh901.c +2 -2
@@ -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 */ {
Signature · 1 line
1.7.9.5
PATCH v2 12/15 ide: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
drivers/ide/ali14xx.c +2 -2
@@ -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 },
drivers/ide/cmd640.c +1 -1
@@ -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 |
drivers/ide/dtc2278.c +1 -1
@@ -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,
drivers/ide/ht6560b.c +1 -1
@@ -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,
drivers/ide/icside.c +1 -1
@@ -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,
drivers/ide/qd65xx.c +1 -1
@@ -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,
drivers/ide/tx4938ide.c +1 -1
@@ -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,
drivers/ide/tx4939ide.c +1 -1
@@ -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,
drivers/ide/umc8672.c +1 -1
@@ -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,
Signature · 1 line
1.7.9.5
PATCH v2 6/15 mfd: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
no changes since (implicit) v1
drivers/mfd/ab5500-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/ab5500-core.c +1 -1
@@ -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 ,
Signature · 1 line
1.7.9.5
PATCH v2 11/15 gpio/samsung: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
no changes since (implicit) v1
drivers/gpio/gpio-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-samsung.c +1 -1
@@ -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" , }, {} };
Signature · 1 line
1.7.9.5
PATCH v2 14/15 drivers/x86: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
drivers/platform/x86/dell-laptop.c +1 -1
@@ -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 = {
Signature · 1 line
1.7.9.5
PATCH v2 7/15 mips: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
arch/mips/bcm63xx/dev-pcmcia.c +2 -2
@@ -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 ,
arch/mips/mti-malta/malta-setup.c +1 -1
@@ -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];
arch/mips/pci/fixup-mpc30x.c +2 -2
@@ -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 ,
arch/mips/powertv/asic/asic-calliope.c +1 -1
@@ -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 )},
arch/mips/powertv/asic/asic-cronus.c +1 -1
@@ -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 )},
arch/mips/powertv/asic/asic-gaia.c +1 -1
@@ -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 },
arch/mips/powertv/asic/asic-zeus.c +1 -1
@@ -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 )},
Signature · 1 line
1.7.9.5
PATCH v2 8/15 h8300: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
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(-)
arch/h8300/kernel/timer/itu.c +1 -1
@@ -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 ) {
arch/h8300/kernel/timer/timer16.c +1 -1
@@ -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 ) {
arch/h8300/kernel/timer/timer8.c +1 -1
@@ -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 ) {
arch/h8300/kernel/timer/tpu.c +1 -1
@@ -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)
arch/h8300/platform/h8300h/irq.c +2 -2
@@ -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,
arch/h8300/platform/h8s/irq.c +2 -2
@@ -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 ,
Signature · 1 line
1.7.9.5
PATCH v2 15/15 kstrtox: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigAs 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.
---
no changes since (implicit) v1
lib/test-kstrtox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/test-kstrtox.c +2 -2
@@ -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) \ { \
Signature · 1 line
1.7.9.5
Guenter Roeck
AppliedRe: [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQuoted 37 lines · Uwe Kleine-König
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $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 <[email protected]>Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>---
changes since (implicit) v1:
- drop wrong changes todrivers/hwmon/w83627hf.cdrivers/hwmon/w83627ehf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)drivers/hwmon/w83627ehf.c +0
-9@@ -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" ;
drivers/hwmon/w83627ehf.c static struct platform_driver w83627ehf_driver = { · line 2631
Quoted 10 lines
drivers/hwmon/w83627ehf.c +9
-0+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 ?
drivers/hwmon/w83627ehf.c static struct platform_driver w83627ehf_driver = { · line 2632
Quoted 1 line
drivers/hwmon/w83627ehf.c +1
-0+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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
Hello Guenter,
Quoted 50 lines · Guenter Roeck
Quoted 37 lines · Uwe Kleine-König
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $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 <[email protected]>Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>---
changes since (implicit) v1:
- drop wrong changes todrivers/hwmon/w83627hf.cdrivers/hwmon/w83627ehf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)drivers/hwmon/w83627ehf.c +0
-9@@ -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" ;drivers/hwmon/w83627ehf.c static struct platform_driver w83627ehf_driver = { · line 2631
Quoted 10 lines
drivers/hwmon/w83627ehf.c +9
-0+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.
Quoted 6 lines
Just wondering: Why not the following ?
drivers/hwmon/w83627ehf.c static struct platform_driver w83627ehf_driver = { · line 2632
Quoted 1 line
drivers/hwmon/w83627ehf.c +1
-0+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
Signature · 7 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH v2 05/15] hwmon: mark const init data with __initconst instead of __initdata
Quoted 59 lines · Uwe Kleine-König
Hello Guenter,
Quoted 50 lines · Guenter Roeck
Quoted 37 lines · Uwe Kleine-König
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $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 <[email protected]>Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>---
changes since (implicit) v1:
- drop wrong changes todrivers/hwmon/w83627hf.cdrivers/hwmon/w83627ehf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)drivers/hwmon/w83627ehf.c +0
-9@@ -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" ;drivers/hwmon/w83627ehf.c static struct platform_driver w83627ehf_driver = { · line 2631
Quoted 10 lines
drivers/hwmon/w83627ehf.c +9
-0+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.
Quoted 6 lines
Just wondering: Why not the following ?
drivers/hwmon/w83627ehf.c static struct platform_driver w83627ehf_driver = { · line 2632
Quoted 1 line
drivers/hwmon/w83627ehf.c +1
-0+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.
Quoted 7 lines
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.
Quoted 5 lines
and
include/linux/init.hhas:You should insert
__initdatabetween the variable name and equal sign followed by value [...].
Seems to be a clear statement.
Quoted 3 lines
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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 02/17] pinctrl: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-König2012/3/29 Uwe Kleine-König <[email protected]>:
Quoted 8 lines
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $variablename causes a section type conflict
because a section containing const variables is marked read only and so cannot contain non-const variables.
Thanks. applied, U300 compiles fine so I trust you on this advice!
Linus Walleij
Re: [PATCH 12/17] gpio/samsung: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-König2012/3/29 Uwe Kleine-König <[email protected]>:
Quoted 4 lines
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail with
Quoted 8 lines
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 <[email protected]>Cc Grant Likely <[email protected]>Cc Linus Walleij <[email protected]>
Thanks,
Linus Walleij
Re: [PATCH v2 01/15] pinctrl: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-König2012/3/30 Uwe Kleine-König <[email protected]>:
Quoted 2 lines
changes since (implict) v1:
- move__initconstafter variable name
Bah, applied this instead of v1.
Thanks,
Linus Walleij
Re: [PATCH v2 02/15] ARM: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigHi Uwe,
Quoted 10 lines · Uwe Kleine-K?nig
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $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 <[email protected]>
For the DaVinci parts,
Thanks,
Sekhar
Artem Bityutskiy
AppliedRe: [PATCH 15/17] mtd: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigQuoted 6 lines · Uwe Kleine-König
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $variablename causes a section type conflict
Pushed to l2-mtd.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
Re: [PATCH v2 06/15] mfd: mark const init data with __initconst instead of __initdata
In reply to Uwe Kleine-KönigHi Uwe,
Quoted 11 lines · Uwe Kleine-König
As long as there is no other non-const variable marked
__initdatain the same compilation unit it doesn't hurt. If there were one however compilation would fail witherror: $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 <[email protected]>Cc Samuel Ortiz <[email protected]>
Patch applied, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/