All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: add __ro_after_init to cyclecounter
@ 2017-02-11 19:20 ` Bhumika Goyal
  0 siblings, 0 replies; 19+ messages in thread
From: Bhumika Goyal @ 2017-02-11 19:20 UTC (permalink / raw)
  To: linux-arm-kernel

The object cyclecounter of type cyclecounter is not getting modified
after getting initialized by arch_counter_register. Apart from
initialization in arch_counter_register it is also passed as an argument
to the function timecounter_init but this argument is of type const.
Therefore, add __ro_after_init to its declaration.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/clocksource/arm_arch_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 4c8c3fb..a10506b 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -580,7 +580,7 @@ static u64 arch_counter_read_cc(const struct cyclecounter *cc)
 	.flags	= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-static struct cyclecounter cyclecounter = {
+static struct cyclecounter cyclecounter __ro_after_init = {
 	.read	= arch_counter_read_cc,
 	.mask	= CLOCKSOURCE_MASK(56),
 };
-- 
1.9.1

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

end of thread, other threads:[~2017-02-12 20:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-11 19:20 [PATCH] clocksource: add __ro_after_init to cyclecounter Bhumika Goyal
2017-02-11 19:20 ` Bhumika Goyal
2017-02-11 20:31 ` Ard Biesheuvel
2017-02-11 20:31   ` Ard Biesheuvel
2017-02-11 20:36   ` Thomas Gleixner
2017-02-11 20:36     ` Thomas Gleixner
2017-02-12 18:20   ` Bhumika Goyal
2017-02-12 18:20     ` Bhumika Goyal
2017-02-12 18:56     ` Thomas Gleixner
2017-02-12 18:56       ` Thomas Gleixner
2017-02-12 19:00       ` Bhumika Goyal
2017-02-12 19:00         ` Bhumika Goyal
2017-02-12 20:07       ` Daniel Lezcano
2017-02-12 20:07         ` Daniel Lezcano
2017-02-11 20:35 ` Thomas Gleixner
2017-02-11 20:35   ` Thomas Gleixner
2017-02-12 18:21   ` Bhumika Goyal
2017-02-12 18:21     ` Bhumika Goyal
2017-02-12 19:28 ` [tip:timers/core] clocksource/drivers/arm_arch_timer:: Mark cyclecounter __ro_after_init tip-bot for Bhumika Goyal

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.