]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ARM: remove duplicate 'const' annotations'
authorArnd Bergmann <arnd@arndb.de>
Thu, 11 May 2017 11:50:16 +0000 (13:50 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 19 May 2017 08:12:55 +0000 (10:12 +0200)
gcc-7 warns about some declarations that are more 'const' than necessary:

arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const ramc_ids[] __initconst = {
arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const timer_of_match[] __initconst = {
arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {

The ones in arch/arm were apparently all introduced accidentally by one
commit that correctly marked a lot of variables as __initconst.

Fixes: dbfb3b429ef9 ("ARM: appropriate __init annotation for const data")
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Krzysztof HaƂasa <khalasa@piap.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-at91/pm.c
arch/arm/mach-bcm/bcm_kona_smc.c
arch/arm/mach-cns3xxx/core.c
arch/arm/mach-omap2/prm_common.c
arch/arm/mach-omap2/vc.c
arch/arm/mach-spear/time.c

index 2cd27c830ab68b3e7e340adb9bfab9d0e42a38ee..283e79ab587de91405e0b579fb16d202ca5072b7 100644 (file)
@@ -335,7 +335,7 @@ static const struct ramc_info ramc_infos[] __initconst = {
        { .idle = sama5d3_ddr_standby, .memctrl = AT91_MEMCTRL_DDRSDR},
 };
 
-static const struct of_device_id const ramc_ids[] __initconst = {
+static const struct of_device_id ramc_ids[] __initconst = {
        { .compatible = "atmel,at91rm9200-sdramc", .data = &ramc_infos[0] },
        { .compatible = "atmel,at91sam9260-sdramc", .data = &ramc_infos[1] },
        { .compatible = "atmel,at91sam9g45-ddramc", .data = &ramc_infos[2] },
index cf3f8658f0e5e9849f866e2135f76aa81c11b1cc..a55a7ecf146a277df8c55603837b67d6fdc30a03 100644 (file)
@@ -33,7 +33,7 @@ struct bcm_kona_smc_data {
        unsigned result;
 };
 
-static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
+static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
        {.compatible = "brcm,kona-smc"},
        {.compatible = "bcm,kona-smc"}, /* deprecated name */
        {},
index 03da3813f1ab631a0f97be7a1d893176820f9b29..7d5a44a06648de2fd8e5e15beef19762d6925e81 100644 (file)
@@ -346,7 +346,7 @@ static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = {
        .power_off      = csn3xxx_usb_power_off,
 };
 
-static const struct of_dev_auxdata const cns3xxx_auxdata[] __initconst = {
+static const struct of_dev_auxdata cns3xxx_auxdata[] __initconst = {
        { "intel,usb-ehci", CNS3XXX_USB_BASE, "ehci-platform", &cns3xxx_usb_ehci_pdata },
        { "intel,usb-ohci", CNS3XXX_USB_OHCI_BASE, "ohci-platform", &cns3xxx_usb_ohci_pdata },
        { "cavium,cns3420-ahci", CNS3XXX_SATA2_BASE, "ahci", NULL },
index 2b138b65129a5d609ff2ae02a55181c10154113b..dc11841ca334c64aa0f70a04781463737c191282 100644 (file)
@@ -711,7 +711,7 @@ static struct omap_prcm_init_data scrm_data __initdata = {
 };
 #endif
 
-static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
+static const struct of_device_id omap_prcm_dt_match_table[] __initconst = {
 #ifdef CONFIG_SOC_AM33XX
        { .compatible = "ti,am3-prcm", .data = &am3_prm_data },
 #endif
index 2028167fff310041cf54037798f81cc8efa9efc2..d76b1e5eb8ba50ed9a09b0e1df3c56b1e2f0c6bb 100644 (file)
@@ -559,7 +559,7 @@ struct i2c_init_data {
        u8 hsscll_12;
 };
 
-static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {
+static const struct i2c_init_data omap4_i2c_timing_data[] __initconst = {
        {
                .load = 50,
                .loadbits = 0x3,
index 4878ba90026df68bb0d06683df795c94ee20d7ec..289e036c9c3054a3e0ba3b9d9f553867c9bd09ef 100644 (file)
@@ -204,7 +204,7 @@ static void __init spear_clockevent_init(int irq)
        setup_irq(irq, &spear_timer_irq);
 }
 
-static const struct of_device_id const timer_of_match[] __initconst = {
+static const struct of_device_id timer_of_match[] __initconst = {
        { .compatible = "st,spear-timer", },
        { },
 };