linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] clocksource/drivers/sp804: misc cleanup
@ 2020-10-29 12:33 Kefeng Wang
  2020-10-29 12:33 ` [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static Kefeng Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kefeng Wang @ 2020-10-29 12:33 UTC (permalink / raw)
  To: Daniel Lezcano, linux-kernel; +Cc: Kefeng Wang

Kefeng Wang (4):
  clocksource/drivers/sp804: Make some symbol static
  clocksource/drivers/sp804: Use clk_prepare_enable and
    clk_disable_unprepare
  clocksource/drivers/sp804: Correct clk_get_rate handle
  clocksource/drivers/sp804: Use pr_fmt

 drivers/clocksource/timer-sp804.c | 41 ++++++++++---------------------
 1 file changed, 13 insertions(+), 28 deletions(-)

-- 
2.26.2


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

* [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static
  2020-10-29 12:33 [PATCH 0/4] clocksource/drivers/sp804: misc cleanup Kefeng Wang
@ 2020-10-29 12:33 ` Kefeng Wang
  2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
  2020-10-29 12:33 ` [PATCH 2/4] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Kefeng Wang
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Kefeng Wang @ 2020-10-29 12:33 UTC (permalink / raw)
  To: Daniel Lezcano, linux-kernel; +Cc: Kefeng Wang

drivers/clocksource/timer-sp804.c:38:31: warning: symbol 'arm_sp804_timer' was not declared. Should it be static?
drivers/clocksource/timer-sp804.c:47:31: warning: symbol 'hisi_sp804_timer' was not declared. Should it be static?
drivers/clocksource/timer-sp804.c:120:12: warning: symbol 'sp804_clocksource_and_sched_clock_init' was not declared. Should it be static?
drivers/clocksource/timer-sp804.c:219:12: warning: symbol 'sp804_clockevents_init' was not declared. Should it be static?

And move __initdata after the variables.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/clocksource/timer-sp804.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 6e8ad4a4ea3c..43d31bf09a18 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -34,8 +34,7 @@
 #define HISI_TIMER_BGLOAD	0x20
 #define HISI_TIMER_BGLOAD_H	0x24
 
-
-struct sp804_timer __initdata arm_sp804_timer = {
+static struct sp804_timer arm_sp804_timer __initdata = {
 	.load		= TIMER_LOAD,
 	.value		= TIMER_VALUE,
 	.ctrl		= TIMER_CTRL,
@@ -44,7 +43,7 @@ struct sp804_timer __initdata arm_sp804_timer = {
 	.width		= 32,
 };
 
-struct sp804_timer __initdata hisi_sp804_timer = {
+static struct sp804_timer hisi_sp804_timer __initdata = {
 	.load		= HISI_TIMER_LOAD,
 	.load_h		= HISI_TIMER_LOAD_H,
 	.value		= HISI_TIMER_VALUE,
@@ -117,7 +116,7 @@ static u64 notrace sp804_read(void)
 	return ~readl_relaxed(sched_clkevt->value);
 }
 
-int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
+static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
 						  const char *name,
 						  struct clk *clk,
 						  int use_sched_clock)
@@ -216,7 +215,7 @@ static struct clock_event_device sp804_clockevent = {
 	.rating			= 300,
 };
 
-int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
+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;
-- 
2.26.2


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

* [PATCH 2/4] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare
  2020-10-29 12:33 [PATCH 0/4] clocksource/drivers/sp804: misc cleanup Kefeng Wang
  2020-10-29 12:33 ` [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static Kefeng Wang
@ 2020-10-29 12:33 ` Kefeng Wang
  2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
  2020-10-29 12:33 ` [PATCH 3/4] clocksource/drivers/sp804: Correct clk_get_rate handle Kefeng Wang
  2020-10-29 12:33 ` [PATCH 4/4] clocksource/drivers/sp804: Use pr_fmt Kefeng Wang
  3 siblings, 1 reply; 9+ messages in thread
From: Kefeng Wang @ 2020-10-29 12:33 UTC (permalink / raw)
  To: Daniel Lezcano, linux-kernel; +Cc: Kefeng Wang

Directly use clk_prepare_enable and clk_disable_unprepare.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/clocksource/timer-sp804.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 43d31bf09a18..9e0cc029b06a 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -68,17 +68,9 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 		return PTR_ERR(clk);
 	}
 
-	err = clk_prepare(clk);
-	if (err) {
-		pr_err("sp804: clock failed to prepare: %d\n", err);
-		clk_put(clk);
-		return err;
-	}
-
-	err = clk_enable(clk);
+	err = clk_prepare_enable(clk);
 	if (err) {
 		pr_err("sp804: clock failed to enable: %d\n", err);
-		clk_unprepare(clk);
 		clk_put(clk);
 		return err;
 	}
@@ -86,8 +78,7 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 	rate = clk_get_rate(clk);
 	if (rate < 0) {
 		pr_err("sp804: clock failed to get rate: %ld\n", rate);
-		clk_disable(clk);
-		clk_unprepare(clk);
+		clk_disable_unprepare(clk);
 		clk_put(clk);
 	}
 
-- 
2.26.2


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

* [PATCH 3/4] clocksource/drivers/sp804: Correct clk_get_rate handle
  2020-10-29 12:33 [PATCH 0/4] clocksource/drivers/sp804: misc cleanup Kefeng Wang
  2020-10-29 12:33 ` [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static Kefeng Wang
  2020-10-29 12:33 ` [PATCH 2/4] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Kefeng Wang
@ 2020-10-29 12:33 ` Kefeng Wang
  2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
  2020-10-29 12:33 ` [PATCH 4/4] clocksource/drivers/sp804: Use pr_fmt Kefeng Wang
  3 siblings, 1 reply; 9+ messages in thread
From: Kefeng Wang @ 2020-10-29 12:33 UTC (permalink / raw)
  To: Daniel Lezcano, linux-kernel; +Cc: Kefeng Wang

clk_get_rate won't return negative value, correct clk_get_rate handle.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/clocksource/timer-sp804.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 9e0cc029b06a..e0b48ecf20ab 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -58,7 +58,6 @@ static struct sp804_clkevt sp804_clkevt[NR_TIMERS];
 
 static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 {
-	long rate;
 	int err;
 
 	if (!clk)
@@ -75,14 +74,7 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 		return err;
 	}
 
-	rate = clk_get_rate(clk);
-	if (rate < 0) {
-		pr_err("sp804: clock failed to get rate: %ld\n", rate);
-		clk_disable_unprepare(clk);
-		clk_put(clk);
-	}
-
-	return rate;
+	return clk_get_rate(clk);
 }
 
 static struct sp804_clkevt * __init sp804_clkevt_get(void __iomem *base)
-- 
2.26.2


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

* [PATCH 4/4] clocksource/drivers/sp804: Use pr_fmt
  2020-10-29 12:33 [PATCH 0/4] clocksource/drivers/sp804: misc cleanup Kefeng Wang
                   ` (2 preceding siblings ...)
  2020-10-29 12:33 ` [PATCH 3/4] clocksource/drivers/sp804: Correct clk_get_rate handle Kefeng Wang
@ 2020-10-29 12:33 ` Kefeng Wang
  2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
  3 siblings, 1 reply; 9+ messages in thread
From: Kefeng Wang @ 2020-10-29 12:33 UTC (permalink / raw)
  To: Daniel Lezcano, linux-kernel; +Cc: Kefeng Wang

Add pr_fmt to prefix pr_<level> output.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/clocksource/timer-sp804.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index e0b48ecf20ab..778ad71a77ac 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -5,6 +5,9 @@
  *  Copyright (C) 1999 - 2003 ARM Limited
  *  Copyright (C) 2000 Deep Blue Solutions Ltd
  */
+
+#define pr_fmt(fmt)    KBUILD_MODNAME ": " fmt
+
 #include <linux/clk.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
@@ -63,13 +66,13 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 	if (!clk)
 		clk = clk_get_sys("sp804", name);
 	if (IS_ERR(clk)) {
-		pr_err("sp804: %s clock not found: %ld\n", name, PTR_ERR(clk));
+		pr_err("%s clock not found: %ld\n", name, PTR_ERR(clk));
 		return PTR_ERR(clk);
 	}
 
 	err = clk_prepare_enable(clk);
 	if (err) {
-		pr_err("sp804: clock failed to enable: %d\n", err);
+		pr_err("clock failed to enable: %d\n", err);
 		clk_put(clk);
 		return err;
 	}
@@ -218,7 +221,7 @@ static int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
 
 	if (request_irq(irq, sp804_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
 			"timer", &sp804_clockevent))
-		pr_err("%s: request_irq() failed\n", "timer");
+		pr_err("request_irq() failed\n");
 	clockevents_config_and_register(evt, rate, 0xf, 0xffffffff);
 
 	return 0;
@@ -280,7 +283,7 @@ static int __init sp804_of_init(struct device_node *np, struct sp804_timer *time
 	if (of_clk_get_parent_count(np) == 3) {
 		clk2 = of_clk_get(np, 1);
 		if (IS_ERR(clk2)) {
-			pr_err("sp804: %pOFn clock not found: %d\n", np,
+			pr_err("%pOFn clock not found: %d\n", np,
 				(int)PTR_ERR(clk2));
 			clk2 = NULL;
 		}
-- 
2.26.2


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

* [tip: timers/core] clocksource/drivers/sp804: Use pr_fmt
  2020-10-29 12:33 ` [PATCH 4/4] clocksource/drivers/sp804: Use pr_fmt Kefeng Wang
@ 2020-12-03 23:47   ` tip-bot2 for Kefeng Wang
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot2 for Kefeng Wang @ 2020-12-03 23:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Kefeng Wang, Daniel Lezcano, x86, linux-kernel

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

Commit-ID:     19f7ce8e36c09f4a2491b065dabd9162018309b6
Gitweb:        https://git.kernel.org/tip/19f7ce8e36c09f4a2491b065dabd9162018309b6
Author:        Kefeng Wang <wangkefeng.wang@huawei.com>
AuthorDate:    Thu, 29 Oct 2020 20:33:17 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 03 Dec 2020 19:16:18 +01:00

clocksource/drivers/sp804: Use pr_fmt

Add pr_fmt to prefix pr_<level> output.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201029123317.90286-5-wangkefeng.wang@huawei.com
---
 drivers/clocksource/timer-sp804.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index fcce839..401d592 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -5,6 +5,9 @@
  *  Copyright (C) 1999 - 2003 ARM Limited
  *  Copyright (C) 2000 Deep Blue Solutions Ltd
  */
+
+#define pr_fmt(fmt)    KBUILD_MODNAME ": " fmt
+
 #include <linux/clk.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
@@ -63,13 +66,13 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 	if (!clk)
 		clk = clk_get_sys("sp804", name);
 	if (IS_ERR(clk)) {
-		pr_err("sp804: %s clock not found: %ld\n", name, PTR_ERR(clk));
+		pr_err("%s clock not found: %ld\n", name, PTR_ERR(clk));
 		return PTR_ERR(clk);
 	}
 
 	err = clk_prepare_enable(clk);
 	if (err) {
-		pr_err("sp804: clock failed to enable: %d\n", err);
+		pr_err("clock failed to enable: %d\n", err);
 		clk_put(clk);
 		return err;
 	}
@@ -218,7 +221,7 @@ static int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
 
 	if (request_irq(irq, sp804_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
 			"timer", &sp804_clockevent))
-		pr_err("%s: request_irq() failed\n", "timer");
+		pr_err("request_irq() failed\n");
 	clockevents_config_and_register(evt, rate, 0xf, 0xffffffff);
 
 	return 0;
@@ -280,7 +283,7 @@ static int __init sp804_of_init(struct device_node *np, struct sp804_timer *time
 	if (of_clk_get_parent_count(np) == 3) {
 		clk2 = of_clk_get(np, 1);
 		if (IS_ERR(clk2)) {
-			pr_err("sp804: %pOFn clock not found: %d\n", np,
+			pr_err("%pOFn clock not found: %d\n", np,
 				(int)PTR_ERR(clk2));
 			clk2 = NULL;
 		}

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

* [tip: timers/core] clocksource/drivers/sp804: Correct clk_get_rate handle
  2020-10-29 12:33 ` [PATCH 3/4] clocksource/drivers/sp804: Correct clk_get_rate handle Kefeng Wang
@ 2020-12-03 23:47   ` tip-bot2 for Kefeng Wang
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot2 for Kefeng Wang @ 2020-12-03 23:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Kefeng Wang, Daniel Lezcano, x86, linux-kernel

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

Commit-ID:     dca54f8ce1c3c979caf06cfdcdf8eab05a00f5ff
Gitweb:        https://git.kernel.org/tip/dca54f8ce1c3c979caf06cfdcdf8eab05a00f5ff
Author:        Kefeng Wang <wangkefeng.wang@huawei.com>
AuthorDate:    Thu, 29 Oct 2020 20:33:16 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 03 Dec 2020 19:16:17 +01:00

clocksource/drivers/sp804: Correct clk_get_rate handle

clk_get_rate won't return negative value, correct clk_get_rate handle.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201029123317.90286-4-wangkefeng.wang@huawei.com
---
 drivers/clocksource/timer-sp804.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index d74788b..fcce839 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -58,7 +58,6 @@ static struct sp804_clkevt sp804_clkevt[NR_TIMERS];
 
 static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 {
-	long rate;
 	int err;
 
 	if (!clk)
@@ -75,14 +74,7 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 		return err;
 	}
 
-	rate = clk_get_rate(clk);
-	if (rate < 0) {
-		pr_err("sp804: clock failed to get rate: %ld\n", rate);
-		clk_disable_unprepare(clk);
-		clk_put(clk);
-	}
-
-	return rate;
+	return clk_get_rate(clk);
 }
 
 static struct sp804_clkevt * __init sp804_clkevt_get(void __iomem *base)

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

* [tip: timers/core] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare
  2020-10-29 12:33 ` [PATCH 2/4] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Kefeng Wang
@ 2020-12-03 23:47   ` tip-bot2 for Kefeng Wang
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot2 for Kefeng Wang @ 2020-12-03 23:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Kefeng Wang, Daniel Lezcano, x86, linux-kernel

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

Commit-ID:     9d4965eb438f0c9f93e91ce6bfec72bbb8def988
Gitweb:        https://git.kernel.org/tip/9d4965eb438f0c9f93e91ce6bfec72bbb8def988
Author:        Kefeng Wang <wangkefeng.wang@huawei.com>
AuthorDate:    Thu, 29 Oct 2020 20:33:15 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 03 Dec 2020 19:16:17 +01:00

clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare

Directly use clk_prepare_enable and clk_disable_unprepare.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201029123317.90286-3-wangkefeng.wang@huawei.com
---
 drivers/clocksource/timer-sp804.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 22a68cb..d74788b 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -68,17 +68,9 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 		return PTR_ERR(clk);
 	}
 
-	err = clk_prepare(clk);
-	if (err) {
-		pr_err("sp804: clock failed to prepare: %d\n", err);
-		clk_put(clk);
-		return err;
-	}
-
-	err = clk_enable(clk);
+	err = clk_prepare_enable(clk);
 	if (err) {
 		pr_err("sp804: clock failed to enable: %d\n", err);
-		clk_unprepare(clk);
 		clk_put(clk);
 		return err;
 	}
@@ -86,8 +78,7 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
 	rate = clk_get_rate(clk);
 	if (rate < 0) {
 		pr_err("sp804: clock failed to get rate: %ld\n", rate);
-		clk_disable(clk);
-		clk_unprepare(clk);
+		clk_disable_unprepare(clk);
 		clk_put(clk);
 	}
 

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

* [tip: timers/core] clocksource/drivers/sp804: Make some symbol static
  2020-10-29 12:33 ` [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static Kefeng Wang
@ 2020-12-03 23:47   ` tip-bot2 for Kefeng Wang
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot2 for Kefeng Wang @ 2020-12-03 23:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Kefeng Wang, Daniel Lezcano, x86, linux-kernel

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

Commit-ID:     3c07bf0fc3558f680374f8ac6d148b0082aa08c6
Gitweb:        https://git.kernel.org/tip/3c07bf0fc3558f680374f8ac6d148b0082aa08c6
Author:        Kefeng Wang <wangkefeng.wang@huawei.com>
AuthorDate:    Thu, 29 Oct 2020 20:33:14 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 03 Dec 2020 19:16:17 +01:00

clocksource/drivers/sp804: Make some symbol static

drivers/clocksource/timer-sp804.c:38:31: warning: symbol 'arm_sp804_timer' was not declared. Should it be static?
drivers/clocksource/timer-sp804.c:47:31: warning: symbol 'hisi_sp804_timer' was not declared. Should it be static?
drivers/clocksource/timer-sp804.c:120:12: warning: symbol 'sp804_clocksource_and_sched_clock_init' was not declared. Should it be static?
drivers/clocksource/timer-sp804.c:219:12: warning: symbol 'sp804_clockevents_init' was not declared. Should it be static?

And move __initdata after the variables.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201029123317.90286-2-wangkefeng.wang@huawei.com
---
 drivers/clocksource/timer-sp804.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index db5330c..22a68cb 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -34,8 +34,7 @@
 #define HISI_TIMER_BGLOAD	0x20
 #define HISI_TIMER_BGLOAD_H	0x24
 
-
-struct sp804_timer __initdata arm_sp804_timer = {
+static struct sp804_timer arm_sp804_timer __initdata = {
 	.load		= TIMER_LOAD,
 	.value		= TIMER_VALUE,
 	.ctrl		= TIMER_CTRL,
@@ -44,7 +43,7 @@ struct sp804_timer __initdata arm_sp804_timer = {
 	.width		= 32,
 };
 
-struct sp804_timer __initdata hisi_sp804_timer = {
+static struct sp804_timer hisi_sp804_timer __initdata = {
 	.load		= HISI_TIMER_LOAD,
 	.load_h		= HISI_TIMER_LOAD_H,
 	.value		= HISI_TIMER_VALUE,

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

end of thread, other threads:[~2020-12-03 23:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 12:33 [PATCH 0/4] clocksource/drivers/sp804: misc cleanup Kefeng Wang
2020-10-29 12:33 ` [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static Kefeng Wang
2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
2020-10-29 12:33 ` [PATCH 2/4] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Kefeng Wang
2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
2020-10-29 12:33 ` [PATCH 3/4] clocksource/drivers/sp804: Correct clk_get_rate handle Kefeng Wang
2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang
2020-10-29 12:33 ` [PATCH 4/4] clocksource/drivers/sp804: Use pr_fmt Kefeng Wang
2020-12-03 23:47   ` [tip: timers/core] " tip-bot2 for Kefeng Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).