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


Groups > linux.kernel > #1723495 > unrolled thread

[PATCH] powerpc: 4xx: constify platform_suspend_ops

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-30 18:50 +0200
Last post2017-09-01 15:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] powerpc: 4xx: constify platform_suspend_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-30 18:50 +0200
    Re: powerpc: 4xx: constify platform_suspend_ops Michael Ellerman <patch-notifications@ellerman.id.au> - 2017-09-01 15:40 +0200

#1723495 — [PATCH] powerpc: 4xx: constify platform_suspend_ops

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-30 18:50 +0200
Subject[PATCH] powerpc: 4xx: constify platform_suspend_ops
Message-ID<ukelH-2il-7@gated-at.bofh.it>
platform_suspend_ops are not supposed to change at runtime.
Functions suspend_set_ops working with const platform_suspend_ops.
So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 arch/powerpc/sysdev/ppc4xx_cpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/ppc4xx_cpm.c b/arch/powerpc/sysdev/ppc4xx_cpm.c
index ba95adf..6483675 100644
--- a/arch/powerpc/sysdev/ppc4xx_cpm.c
+++ b/arch/powerpc/sysdev/ppc4xx_cpm.c
@@ -240,7 +240,7 @@ static int cpm_suspend_enter(suspend_state_t state)
 	return 0;
 }
 
-static struct platform_suspend_ops cpm_suspend_ops = {
+static const struct platform_suspend_ops cpm_suspend_ops = {
 	.valid		= cpm_suspend_valid,
 	.enter		= cpm_suspend_enter,
 };
-- 
2.7.4

[toc] | [next] | [standalone]


#1725079 — Re: powerpc: 4xx: constify platform_suspend_ops

FromMichael Ellerman <patch-notifications@ellerman.id.au>
Date2017-09-01 15:40 +0200
SubjectRe: powerpc: 4xx: constify platform_suspend_ops
Message-ID<ukUkW-5wR-31@gated-at.bofh.it>
In reply to#1723495
On Wed, 2017-08-30 at 16:48:20 UTC, Arvind Yadav wrote:
> platform_suspend_ops are not supposed to change at runtime.
> Functions suspend_set_ops working with const platform_suspend_ops.
> So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7def9a2418430a8af2a56023769ccd

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web