Skip to contentSkip to conversation

clocksource: sp804: add static for functions such as sp804_clockevents_init()

PATCH Applied Zhen Lei 2 participants 3 messages Oct 21, 2020 – Dec 3, 2020 Clocksource, clockevent drivers

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

v2 cover clocksource: sp804: add static for functions such as sp804_clockevents_init()

v1 --> v2:
Add warning information into the description of this patch. And correct the commit-id of "Fixes:", the old one is come from linux-next, but it's changed when merged into v5.10-rc1.

Zhen Lei (1):
clocksource: sp804: add static for functions such as

    sp804_clockevents_init()
 drivers/clocksource/timer-sp804.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.8.3
author
#1 lore raw

PATCH v2 1/1 clocksource: sp804: add static for functions such as sp804_clockevents_init()

Add static for sp804_clocksource_and_sched_clock_init() and sp804_clockevents_init(), they are only used in timer-sp804.c now. Otherwise, the following warning will be reported:

drivers/clocksource/timer-sp804.c:68:12: warning: no previous prototype \
for 'sp804_clocksource_and_sched_clock_init' [-Wmissing-prototypes] drivers/clocksource/timer-sp804.c:162:12: warning: no previous prototype \
for 'sp804_clockevents_init' [-Wmissing-prototypes]

Fixes 975434f8b24a ("clocksource/drivers/sp804: Delete the leading "__" of some functions")
Fixes 65f4d7ddc7b6 ("clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h")
---
 drivers/clocksource/timer-sp804.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/clocksource/timer-sp804.c +6 -6
index 6e8ad4a4ea3c737..db5330cc49bca72 100644
@@ -117,10 +117,10 @@ static u64 notrace sp804_read(void)
 	return ~readl_relaxed(sched_clkevt->value);
 }
 
-int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
-						  const char *name,
-						  struct clk *clk,
-						  int use_sched_clock)
+static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
+							 const char *name,
+							 struct clk *clk,
+							 int use_sched_clock)
 {
 	long rate;
 	struct sp804_clkevt *clkevt;
@@ -216,8 +216,8 @@ static int sp804_set_next_event(unsigned long next,
 	.rating			= 300,
 };
 
-int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
-				  struct clk *clk, const char *name)
+static int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
+					 struct clk *clk, const char *name)
 {
 	struct clock_event_device *evt = &sp804_clockevent;
 	long rate;
Signature · 1 line
1.8.3
merge bot Applied
#2 lore raw

[tip: timers/core] clocksource/drivers/sp804: Add static for functions such as sp804_clockevents_init()

The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     3c0a4b185f6c82c06025720b00a490c719a6f0ff
Gitweb:        https://git.kernel.org/tip/3c0a4b185f6c82c06025720b00a490c719a6f0ff
Author:        Zhen Lei <[email protected]>
AuthorDate:    Wed, 21 Oct 2020 09:22:59 +08:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Thu, 03 Dec 2020 19:16:09 +01:00

clocksource/drivers/sp804: Add static for functions such as sp804_clockevents_init()

Add static for sp804_clocksource_and_sched_clock_init() and sp804_clockevents_init(), they are only used in timer-sp804.c now. Otherwise, the following warning will be reported:

drivers/clocksource/timer-sp804.c:68:12: warning: no previous prototype \
for 'sp804_clocksource_and_sched_clock_init' [-Wmissing-prototypes] drivers/clocksource/timer-sp804.c:162:12: warning: no previous prototype \
for 'sp804_clockevents_init' [-Wmissing-prototypes]

Fixes 975434f8b24a ("clocksource/drivers/sp804: Delete the leading "__" of some functions")
Fixes 65f4d7ddc7b6 ("clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h")
---
 drivers/clocksource/timer-sp804.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/clocksource/timer-sp804.c +6 -6
index 6e8ad4a..db5330c 100644
@@ -117,10 +117,10 @@ static u64 notrace sp804_read(void)
 	return ~readl_relaxed(sched_clkevt->value);
 }
 
-int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
-						  const char *name,
-						  struct clk *clk,
-						  int use_sched_clock)
+static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
+							 const char *name,
+							 struct clk *clk,
+							 int use_sched_clock)
 {
 	long rate;
 	struct sp804_clkevt *clkevt;
@@ -216,8 +216,8 @@ static struct clock_event_device sp804_clockevent = {
 	.rating			= 300,
 };
 
-int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
-				  struct clk *clk, const char *name)
+static int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
+					 struct clk *clk, const char *name)
 {
 	struct clock_event_device *evt = &sp804_clockevent;
 	long rate;