Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1362790 > unrolled thread

[PATCH 0/4] ARM: cpuidle: use const and __initconst for cpuidle_ops

Started byJisheng Zhang <jszhang@marvell.com>
First post2016-03-22 15:50 +0100
Last post2016-03-25 12:30 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] ARM: cpuidle: use const and __initconst for cpuidle_ops Jisheng Zhang <jszhang@marvell.com> - 2016-03-22 15:50 +0100
    [PATCH 3/4] soc: qcom: spm: use const and __initconst for qcom_cpuidle_ops Jisheng Zhang <jszhang@marvell.com> - 2016-03-22 15:50 +0100
    [PATCH 4/4] drivers: firmware: psci: use const and __initconst for psci_cpuidle_ops Jisheng Zhang <jszhang@marvell.com> - 2016-03-22 15:50 +0100
    Re: [PATCH 0/4] ARM: cpuidle: use const and __initconst for  cpuidle_ops Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-03-25 12:30 +0100

#1362790 — [PATCH 0/4] ARM: cpuidle: use const and __initconst for cpuidle_ops

FromJisheng Zhang <jszhang@marvell.com>
Date2016-03-22 15:50 +0100
Subject[PATCH 0/4] ARM: cpuidle: use const and __initconst for cpuidle_ops
Message-ID<rfvN7-5Sf-7@gated-at.bofh.it>
These trivial patches are similar as Masahiro posted in[1]. The main
purpose is let cpuidle_ops structure be constified and replace
"__initdata" with "__initconst".

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-August/365826.html

Jisheng Zhang (4):
  ARM: cpuidle: add const qualifier to cpuidle_ops member in structures
  ARM: cpuidle: constify return value of arm_cpuidle_get_ops()
  soc: qcom: spm: use const and __initconst for qcom_cpuidle_ops
  drivers: firmware: psci: use const and __initconst for
    psci_cpuidle_ops

 arch/arm/include/asm/cpuidle.h | 2 +-
 arch/arm/kernel/cpuidle.c      | 6 +++---
 drivers/firmware/psci.c        | 2 +-
 drivers/soc/qcom/spm.c         | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.8.0.rc3

[toc] | [next] | [standalone]


#1362791 — [PATCH 3/4] soc: qcom: spm: use const and __initconst for qcom_cpuidle_ops

FromJisheng Zhang <jszhang@marvell.com>
Date2016-03-22 15:50 +0100
Subject[PATCH 3/4] soc: qcom: spm: use const and __initconst for qcom_cpuidle_ops
Message-ID<rfvN8-5Sf-25@gated-at.bofh.it>
In reply to#1362790
The qcom_cpuidle_ops structures is not over-written, so add "const"
qualifier and replace __initdata with __initconst.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 drivers/soc/qcom/spm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index 5548a31..1fcbb22 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -274,7 +274,7 @@ check_spm:
 	return per_cpu(cpu_spm_drv, cpu) ? 0 : -ENXIO;
 }
 
-static struct cpuidle_ops qcom_cpuidle_ops __initdata = {
+static const struct cpuidle_ops qcom_cpuidle_ops __initconst = {
 	.suspend = qcom_idle_enter,
 	.init = qcom_cpuidle_init,
 };
-- 
2.8.0.rc3

[toc] | [prev] | [next] | [standalone]


#1362795 — [PATCH 4/4] drivers: firmware: psci: use const and __initconst for psci_cpuidle_ops

FromJisheng Zhang <jszhang@marvell.com>
Date2016-03-22 15:50 +0100
Subject[PATCH 4/4] drivers: firmware: psci: use const and __initconst for psci_cpuidle_ops
Message-ID<rfvN8-5Sf-29@gated-at.bofh.it>
In reply to#1362790
The psci_cpuidle_ops structures is not over-written, so add "const"
qualifier and replace __initdata with __initconst.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 6d86881..7d52186 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -355,7 +355,7 @@ int psci_cpu_suspend_enter(unsigned long index)
 
 /* ARM specific CPU idle operations */
 #ifdef CONFIG_ARM
-static struct cpuidle_ops psci_cpuidle_ops __initdata = {
+static const struct cpuidle_ops psci_cpuidle_ops __initconst = {
 	.suspend = psci_cpu_suspend_enter,
 	.init = psci_dt_cpu_init_idle,
 };
-- 
2.8.0.rc3

[toc] | [prev] | [next] | [standalone]


#1364637 — Re: [PATCH 0/4] ARM: cpuidle: use const and __initconst for cpuidle_ops

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2016-03-25 12:30 +0100
SubjectRe: [PATCH 0/4] ARM: cpuidle: use const and __initconst for cpuidle_ops
Message-ID<rgy6d-US-5@gated-at.bofh.it>
In reply to#1362790
On 03/22/2016 03:42 PM, Jisheng Zhang wrote:
> These trivial patches are similar as Masahiro posted in[1]. The main
> purpose is let cpuidle_ops structure be constified and replace
> "__initdata" with "__initconst".
>
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-August/365826.html
>
> Jisheng Zhang (4):
>    ARM: cpuidle: add const qualifier to cpuidle_ops member in structures
>    ARM: cpuidle: constify return value of arm_cpuidle_get_ops()
>    soc: qcom: spm: use const and __initconst for qcom_cpuidle_ops
>    drivers: firmware: psci: use const and __initconst for
>      psci_cpuidle_ops
>
>   arch/arm/include/asm/cpuidle.h | 2 +-
>   arch/arm/kernel/cpuidle.c      | 6 +++---
>   drivers/firmware/psci.c        | 2 +-
>   drivers/soc/qcom/spm.c         | 2 +-
>   4 files changed, 6 insertions(+), 6 deletions(-)

Sounds reasonable.

   -- Daniel


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web