Skip to contentSkip to conversation

x86/numachip: add const and __initconst to numachip2_clockevent

PATCH New Bhumika Goyal 2 participants 2 messages Aug 29, 2017 – Sep 25, 2017 Clocksource, clockevent drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/numachip: add const and __initconst to numachip2_clockevent

Make this const as it is only used during a copy operation and add __initconst as this usage is during the initialization phase.

---
 drivers/clocksource/numachip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/numachip.c +1 -1
index 6a20dc8..9a7d7f0 100644
@@ -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,
Signature · 1 line
1.9.1
#1 lore raw

[tip:x86/urgent] x86/numachip: Add const and __initconst to numachip2_clockevent

x86/numachip: Add const and __initconst to numachip2_clockevent
Commit-ID:  10430364ebb562311ba6a6efa74e0c2298007912
Gitweb:     http://git.kernel.org/tip/10430364ebb562311ba6a6efa74e0c2298007912
Author:     Bhumika Goyal <[email protected]>
AuthorDate: Tue, 29 Aug 2017 23:47:11 +0530
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 25 Sep 2017 09:36:15 +0200

x86/numachip: Add const and __initconst to numachip2_clockevent

Make this const as it is only used during a copy operation and add __initconst as this usage is during the initialization phase.

---
 drivers/clocksource/numachip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/numachip.c +1 -1
index 6a20dc8..9a7d7f0 100644
@@ -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,