Thread (4 messages) 4 messages, 2 authors, 2018-10-29
STALE2806d

[PATCH 2/8] ARM: vexpress/spc: constify clk_ops structure

From: Julia Lawall <hidden>
Date: 2018-10-27 06:23:14
Also in: kernel-janitors, lkml
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

The clk_ops structure is only stored in the ops field of a
clk_init_data structure.  This field is const, so the clk_ops
structure can be const as well.

Identified and transformed using Coccinelle.

Signed-off-by: Julia Lawall <redacted>

---
 arch/arm/mach-vexpress/spc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c
index 0f5381d13494..611f22de48cb 100644
--- a/arch/arm/mach-vexpress/spc.c
+++ b/arch/arm/mach-vexpress/spc.c
@@ -521,7 +521,7 @@ static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
 	return ve_spc_set_performance(spc->cluster, rate / 1000);
 }
 
-static struct clk_ops clk_spc_ops = {
+static const struct clk_ops clk_spc_ops = {
 	.recalc_rate = spc_recalc_rate,
 	.round_rate = spc_round_rate,
 	.set_rate = spc_set_rate,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help