[PATCH 2/2] ARM: use const and __initconst for smp_operations
Florian Fainelli
f.fainelli at gmail.com
Thu Nov 19 11:16:48 PST 2015
On 14/11/15 17:39, Masahiro Yamada wrote:
> These smp_operations structures are not over-written, so add "const"
> qualifier and replace __initdata with __initconst.
>
> Also, add "static" where it is possible.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> Acked-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
> Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> Acked-by: Moritz Fischer <moritz.fischer at ettus.com>
> ---
> arch/arm/mach-bcm/bcm63xx_smp.c | 2 +-
> arch/arm/mach-bcm/kona_smp.c | 2 +-
> arch/arm/mach-bcm/platsmp-brcmstb.c | 2 +-
> -struct smp_operations bcm63138_smp_ops __initdata = {
> +static const struct smp_operations bcm63138_smp_ops __initconst = {
> .smp_prepare_cpus = bcm63138_smp_prepare_cpus,
> .smp_boot_secondary = bcm63138_smp_boot_secondary,
> };
> diff --git a/arch/arm/mach-bcm/kona_smp.c b/arch/arm/mach-bcm/kona_smp.c
> index 66a0465..da8328b 100644
> --- a/arch/arm/mach-bcm/kona_smp.c
> +++ b/arch/arm/mach-bcm/kona_smp.c
> @@ -194,7 +194,7 @@ static int bcm_boot_secondary(unsigned int cpu, struct task_struct *idle)
> return -ENOSYS;
> }
>
> -static struct smp_operations bcm_smp_ops __initdata = {
> +static const struct smp_operations bcm_smp_ops __initconst = {
> .smp_prepare_cpus = bcm_smp_prepare_cpus,
> .smp_boot_secondary = bcm_boot_secondary,
> };
> diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c
> index 44d6bddf..40dc844 100644
> --- a/arch/arm/mach-bcm/platsmp-brcmstb.c
> +++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
> @@ -356,7 +356,7 @@ static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle)
> return 0;
> }
>
> -static struct smp_operations brcmstb_smp_ops __initdata = {
> +static const struct smp_operations brcmstb_smp_ops __initconst = {
> .smp_prepare_cpus = brcmstb_cpu_ctrl_setup,
> .smp_boot_secondary = brcmstb_boot_secondary,
> #ifdef CONFIG_HOTPLUG_CPU
For the Broadcom SoCs:
Acked-by: Florian Fainelli <f.fainelli at gmail.com>
--
Florian
More information about the Linux-mediatek
mailing list