mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/numachip: make numachip2_clockevent const and __initconst
@ 2017-09-18 12:53 Bhumika Goyal
  0 siblings, 0 replies; only message in thread
From: Bhumika Goyal @ 2017-09-18 12:53 UTC (permalink / raw)
  To: julia.lawall, daniel.lezcano, tglx, linux-kernel; +Cc: Bhumika Goyal

Make this const as it is only used during a copy operation. This usage
is during the init phase, so annotate the structure with __initconst
too.
Done using Coccinelle.

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

diff --git a/drivers/clocksource/numachip.c b/drivers/clocksource/numachip.c
index 6a20dc8..9a7d7f0 100644
--- a/drivers/clocksource/numachip.c
+++ b/drivers/clocksource/numachip.c
@@ -43,7 +43,7 @@ static int numachip2_set_next_event(unsigned long delta, struct clock_event_devi
 	return 0;
 }
 
-static struct clock_event_device numachip2_clockevent = {
+static const struct clock_event_device numachip2_clockevent __initconst = {
 	.name            = "numachip2",
 	.rating          = 400,
 	.set_next_event  = numachip2_set_next_event,
-- 
1.9.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-18 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 12:53 [PATCH] x86/numachip: make numachip2_clockevent const and __initconst Bhumika Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®