diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-05-16 17:25:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-18 22:01:27 -0400 |
commit | fcea8b27f985bc02fd7b040bbb5914227a0f49d7 (patch) | |
tree | 777ad8cffee084f06649d7360983a764ecc68df5 /arch/sparc/kernel | |
parent | d2aca8f9a64c26dcd9b3eb27db949f830eb80b28 (diff) |
sparc32: fix sparse warnings in time_32.c
Fix following warnings:
time_32.c:63:1: warning: symbol 'rtc_lock' was not declared. Should it be static?
time_32.c:357:13: warning: symbol 'time_init' was not declared. Should it be static?
time_32.c:148:16: warning: dereference of noderef expression
Add extern definition of rtc_lock in mc146818rtc.h.
time_init() is called from init/main.c - add prototype to kernel.h.
Use proper u32 __iomem * for master_l10_counter.
Fix all users.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/kernel.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_kernel.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/time_32.c | 8 |
3 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 52542419795c..4a8d0db680f5 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h | |||
@@ -144,6 +144,9 @@ void __init auxio_power_probe(void); | |||
144 | extern void __iomem *pcic_regs; | 144 | extern void __iomem *pcic_regs; |
145 | void pcic_nmi(unsigned int pend, struct pt_regs *regs); | 145 | void pcic_nmi(unsigned int pend, struct pt_regs *regs); |
146 | 146 | ||
147 | /* time_32.c */ | ||
148 | void __init time_init(void); | ||
149 | |||
147 | #else /* CONFIG_SPARC32 */ | 150 | #else /* CONFIG_SPARC32 */ |
148 | #endif /* CONFIG_SPARC32 */ | 151 | #endif /* CONFIG_SPARC32 */ |
149 | #endif /* !(__SPARC_KERNEL_H) */ | 152 | #endif /* !(__SPARC_KERNEL_H) */ |
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index d9397088893a..683c4af999de 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -32,7 +32,7 @@ struct leon3_gptimer_regs_map *leon3_gptimer_regs; /* timer controller base addr | |||
32 | 32 | ||
33 | int leondebug_irq_disable; | 33 | int leondebug_irq_disable; |
34 | int leon_debug_irqout; | 34 | int leon_debug_irqout; |
35 | static volatile unsigned int dummy_master_l10_counter; | 35 | static volatile u32 dummy_master_l10_counter; |
36 | unsigned long amba_system_id; | 36 | unsigned long amba_system_id; |
37 | static DEFINE_SPINLOCK(leon_irq_lock); | 37 | static DEFINE_SPINLOCK(leon_irq_lock); |
38 | 38 | ||
@@ -313,8 +313,7 @@ void __init leon_init_timers(void) | |||
313 | 313 | ||
314 | leondebug_irq_disable = 0; | 314 | leondebug_irq_disable = 0; |
315 | leon_debug_irqout = 0; | 315 | leon_debug_irqout = 0; |
316 | master_l10_counter = | 316 | master_l10_counter = (u32 __iomem *)&dummy_master_l10_counter; |
317 | (unsigned int __iomem *)&dummy_master_l10_counter; | ||
318 | dummy_master_l10_counter = 0; | 317 | dummy_master_l10_counter = 0; |
319 | 318 | ||
320 | rootnp = of_find_node_by_path("/ambapp0"); | 319 | rootnp = of_find_node_by_path("/ambapp0"); |
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 772b37986a9c..5923d1e4e7c9 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/of_device.h> | 36 | #include <linux/of_device.h> |
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | 38 | ||
39 | #include <asm/mc146818rtc.h> | ||
39 | #include <asm/oplib.h> | 40 | #include <asm/oplib.h> |
40 | #include <asm/timex.h> | 41 | #include <asm/timex.h> |
41 | #include <asm/timer.h> | 42 | #include <asm/timer.h> |
@@ -47,6 +48,7 @@ | |||
47 | #include <asm/irq_regs.h> | 48 | #include <asm/irq_regs.h> |
48 | #include <asm/setup.h> | 49 | #include <asm/setup.h> |
49 | 50 | ||
51 | #include "kernel.h" | ||
50 | #include "irq.h" | 52 | #include "irq.h" |
51 | 53 | ||
52 | static __cacheline_aligned_in_smp DEFINE_SEQLOCK(timer_cs_lock); | 54 | static __cacheline_aligned_in_smp DEFINE_SEQLOCK(timer_cs_lock); |
@@ -83,7 +85,7 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
83 | 85 | ||
84 | EXPORT_SYMBOL(profile_pc); | 86 | EXPORT_SYMBOL(profile_pc); |
85 | 87 | ||
86 | volatile unsigned int __iomem *master_l10_counter; | 88 | volatile u32 __iomem *master_l10_counter; |
87 | 89 | ||
88 | int update_persistent_clock(struct timespec now) | 90 | int update_persistent_clock(struct timespec now) |
89 | { | 91 | { |
@@ -143,9 +145,9 @@ static __init void setup_timer_ce(void) | |||
143 | 145 | ||
144 | static unsigned int sbus_cycles_offset(void) | 146 | static unsigned int sbus_cycles_offset(void) |
145 | { | 147 | { |
146 | unsigned int val, offset; | 148 | u32 val, offset; |
147 | 149 | ||
148 | val = *master_l10_counter; | 150 | val = sbus_readl(master_l10_counter); |
149 | offset = (val >> TIMER_VALUE_SHIFT) & TIMER_VALUE_MASK; | 151 | offset = (val >> TIMER_VALUE_SHIFT) & TIMER_VALUE_MASK; |
150 | 152 | ||
151 | /* Limit hit? */ | 153 | /* Limit hit? */ |