diff mbox

gpio, bcm-kona, LLVMLinux: Remove use of __initconst

Message ID 1411500616-12863-1-git-send-email-behanw@converseincode.com
State New
Headers show

Commit Message

Behan Webster Sept. 23, 2014, 7:30 p.m. UTC
From: Behan Webster <behanw@converseincode.com>

The __initconst is in the wrong place, and when moved to the correct place
it uncovers an error where the variable is used by non-init data structures.

Instead merely make them const and put the const in the right spot.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/gpio-bcm-kona.c      | 2 +-
 drivers/mmc/host/sdhci-bcm-kona.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Matt Porter Sept. 23, 2014, 9:20 p.m. UTC | #1
On Tue, Sep 23, 2014 at 12:30:16PM -0700, behanw@converseincode.com wrote:
> From: Behan Webster <behanw@converseincode.com>
> 
> The __initconst is in the wrong place, and when moved to the correct place
> it uncovers an error where the variable is used by non-init data structures.
> 
> Instead merely make them const and put the const in the right spot.
> 
> Signed-off-by: Behan Webster <behanw@converseincode.com>
> Reviewed-by: Mark Charlebois <charlebm@gmail.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/gpio/gpio-bcm-kona.c      | 2 +-
>  drivers/mmc/host/sdhci-bcm-kona.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index 3f6b33c..de0801e 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -496,7 +496,7 @@ static struct irq_chip bcm_gpio_irq_chip = {
>  	.irq_release_resources = bcm_kona_gpio_irq_relres,
>  };
>  
> -static struct __initconst of_device_id bcm_kona_gpio_of_match[] = {
> +static struct of_device_id const bcm_kona_gpio_of_match[] = {
>  	{ .compatible = "brcm,kona-gpio" },
>  	{}
>  };
> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
> index dd780c3..4bb06c8 100644
> --- a/drivers/mmc/host/sdhci-bcm-kona.c
> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
> @@ -225,7 +225,7 @@ static struct sdhci_pltfm_data sdhci_pltfm_data_kona = {
>  		SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>  };
>  
> -static struct __initconst of_device_id sdhci_bcm_kona_of_match[] = {
> +static struct of_device_id const sdhci_bcm_kona_of_match[] = {
>  	{ .compatible = "brcm,kona-sdhci"},
>  	{ .compatible = "bcm,kona-sdhci"}, /* deprecated name */
>  	{}

Acked-by: Matt Porter <mporter@linaro.org>

-Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matt Porter Sept. 23, 2014, 9:29 p.m. UTC | #2
On Tue, Sep 23, 2014 at 12:30:16PM -0700, behanw@converseincode.com wrote:
> From: Behan Webster <behanw@converseincode.com>
> 
> The __initconst is in the wrong place, and when moved to the correct place
> it uncovers an error where the variable is used by non-init data structures.
> 
> Instead merely make them const and put the const in the right spot.
> 
> Signed-off-by: Behan Webster <behanw@converseincode.com>
> Reviewed-by: Mark Charlebois <charlebm@gmail.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/gpio/gpio-bcm-kona.c      | 2 +-
>  drivers/mmc/host/sdhci-bcm-kona.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

As mentioned on IRC, Linus, Chris, and Ulf probably would like this
split to go into each respective tree.

-Matt

> 
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index 3f6b33c..de0801e 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -496,7 +496,7 @@ static struct irq_chip bcm_gpio_irq_chip = {
>  	.irq_release_resources = bcm_kona_gpio_irq_relres,
>  };
>  
> -static struct __initconst of_device_id bcm_kona_gpio_of_match[] = {
> +static struct of_device_id const bcm_kona_gpio_of_match[] = {
>  	{ .compatible = "brcm,kona-gpio" },
>  	{}
>  };
> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
> index dd780c3..4bb06c8 100644
> --- a/drivers/mmc/host/sdhci-bcm-kona.c
> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
> @@ -225,7 +225,7 @@ static struct sdhci_pltfm_data sdhci_pltfm_data_kona = {
>  		SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>  };
>  
> -static struct __initconst of_device_id sdhci_bcm_kona_of_match[] = {
> +static struct of_device_id const sdhci_bcm_kona_of_match[] = {
>  	{ .compatible = "brcm,kona-sdhci"},
>  	{ .compatible = "bcm,kona-sdhci"}, /* deprecated name */
>  	{}
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Behan Webster Sept. 23, 2014, 10:59 p.m. UTC | #3
On 09/23/14 14:29, Matt Porter wrote:
> On Tue, Sep 23, 2014 at 12:30:16PM -0700, behanw@converseincode.com wrote:
>> From: Behan Webster <behanw@converseincode.com>
>>
>> The __initconst is in the wrong place, and when moved to the correct place
>> it uncovers an error where the variable is used by non-init data structures.
>>
>> Instead merely make them const and put the const in the right spot.
>>
>> Signed-off-by: Behan Webster <behanw@converseincode.com>
>> Reviewed-by: Mark Charlebois <charlebm@gmail.com>
>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>   drivers/gpio/gpio-bcm-kona.c      | 2 +-
>>   drivers/mmc/host/sdhci-bcm-kona.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
> As mentioned on IRC, Linus, Chris, and Ulf probably would like this
> split to go into each respective tree.
Thanks Matt.

I reposted as a 2 patch series. Strictly speaking one patch is for each 
tree.

Behan
diff mbox

Patch

diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index 3f6b33c..de0801e 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -496,7 +496,7 @@  static struct irq_chip bcm_gpio_irq_chip = {
 	.irq_release_resources = bcm_kona_gpio_irq_relres,
 };
 
-static struct __initconst of_device_id bcm_kona_gpio_of_match[] = {
+static struct of_device_id const bcm_kona_gpio_of_match[] = {
 	{ .compatible = "brcm,kona-gpio" },
 	{}
 };
diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
index dd780c3..4bb06c8 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -225,7 +225,7 @@  static struct sdhci_pltfm_data sdhci_pltfm_data_kona = {
 		SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 };
 
-static struct __initconst of_device_id sdhci_bcm_kona_of_match[] = {
+static struct of_device_id const sdhci_bcm_kona_of_match[] = {
 	{ .compatible = "brcm,kona-sdhci"},
 	{ .compatible = "bcm,kona-sdhci"}, /* deprecated name */
 	{}