All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/512x: clk: constify clk_div_table
@ 2017-08-28  6:05 Arvind Yadav
  2017-08-31 11:36 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-28  6:05 UTC (permalink / raw)
  To: agust, benh, paulus, mpe; +Cc: linux-kernel, linuxppc-dev

clk_div_table are not supposed to change at runtime.
mpc512x_clk_divtable function working with const
clk_div_table. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 arch/powerpc/platforms/512x/clock-commonclk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c
index add5a53..b3097fe 100644
--- a/arch/powerpc/platforms/512x/clock-commonclk.c
+++ b/arch/powerpc/platforms/512x/clock-commonclk.c
@@ -363,7 +363,7 @@ static int get_cpmf_mult_x2(void)
  */
 
 /* applies to the IPS_DIV, and PCI_DIV values */
-static struct clk_div_table divtab_2346[] = {
+static const struct clk_div_table divtab_2346[] = {
 	{ .val = 2, .div = 2, },
 	{ .val = 3, .div = 3, },
 	{ .val = 4, .div = 4, },
@@ -372,7 +372,7 @@ static int get_cpmf_mult_x2(void)
 };
 
 /* applies to the MBX_DIV, LPC_DIV, and NFC_DIV values */
-static struct clk_div_table divtab_1234[] = {
+static const struct clk_div_table divtab_1234[] = {
 	{ .val = 1, .div = 1, },
 	{ .val = 2, .div = 2, },
 	{ .val = 3, .div = 3, },
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: powerpc/512x: clk: constify clk_div_table
  2017-08-28  6:05 [PATCH] powerpc/512x: clk: constify clk_div_table Arvind Yadav
@ 2017-08-31 11:36 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-08-31 11:36 UTC (permalink / raw)
  To: Arvind Yadav, agust, benh, paulus; +Cc: linuxppc-dev, linux-kernel

On Mon, 2017-08-28 at 06:05:15 UTC, Arvind Yadav wrote:
> clk_div_table are not supposed to change at runtime.
> mpc512x_clk_divtable function working with const
> clk_div_table. 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/9e2b70fbbc451cc56863644f6e7349

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-31 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28  6:05 [PATCH] powerpc/512x: clk: constify clk_div_table Arvind Yadav
2017-08-31 11:36 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.