aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-12 02:39:11 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-12 02:39:11 -0400
commitd8ada0a2cd11c991d8193a3f7d37f1806c93c4a0 (patch)
tree6bf0fa254292ca0368ea930a1a1d89199a839f9c /arch/sparc64
parentb0f1e7962f93a78630161c7c9fc263de43c101ac (diff)
sparc64: Fix sparse warnings in kernel/time.c
1) Using "clock" as a local variable shadows a global variable of the same name declared in linux/clocksource.h 2) rtc_cmos_resource should be static Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/time.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 8d2ca04d309e..80d71a5ce1e3 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -409,7 +409,7 @@ int update_persistent_clock(struct timespec now)
409unsigned long cmos_regs; 409unsigned long cmos_regs;
410EXPORT_SYMBOL(cmos_regs); 410EXPORT_SYMBOL(cmos_regs);
411 411
412struct resource rtc_cmos_resource; 412static struct resource rtc_cmos_resource;
413 413
414static struct platform_device rtc_cmos_device = { 414static struct platform_device rtc_cmos_device = {
415 .name = "rtc_cmos", 415 .name = "rtc_cmos",
@@ -621,7 +621,7 @@ fs_initcall(clock_init);
621static unsigned long sparc64_init_timers(void) 621static unsigned long sparc64_init_timers(void)
622{ 622{
623 struct device_node *dp; 623 struct device_node *dp;
624 unsigned long clock; 624 unsigned long freq;
625 625
626 dp = of_find_node_by_path("/"); 626 dp = of_find_node_by_path("/");
627 if (tlb_type == spitfire) { 627 if (tlb_type == spitfire) {
@@ -634,17 +634,17 @@ static unsigned long sparc64_init_timers(void)
634 if (manuf == 0x17 && impl == 0x13) { 634 if (manuf == 0x17 && impl == 0x13) {
635 /* Hummingbird, aka Ultra-IIe */ 635 /* Hummingbird, aka Ultra-IIe */
636 tick_ops = &hbtick_operations; 636 tick_ops = &hbtick_operations;
637 clock = of_getintprop_default(dp, "stick-frequency", 0); 637 freq = of_getintprop_default(dp, "stick-frequency", 0);
638 } else { 638 } else {
639 tick_ops = &tick_operations; 639 tick_ops = &tick_operations;
640 clock = local_cpu_data().clock_tick; 640 freq = local_cpu_data().clock_tick;
641 } 641 }
642 } else { 642 } else {
643 tick_ops = &stick_operations; 643 tick_ops = &stick_operations;
644 clock = of_getintprop_default(dp, "stick-frequency", 0); 644 freq = of_getintprop_default(dp, "stick-frequency", 0);
645 } 645 }
646 646
647 return clock; 647 return freq;
648} 648}
649 649
650struct freq_table { 650struct freq_table {
@@ -836,16 +836,16 @@ EXPORT_SYMBOL(udelay);
836 836
837void __init time_init(void) 837void __init time_init(void)
838{ 838{
839 unsigned long clock = sparc64_init_timers(); 839 unsigned long freq = sparc64_init_timers();
840 840
841 tb_ticks_per_usec = clock / USEC_PER_SEC; 841 tb_ticks_per_usec = freq / USEC_PER_SEC;
842 842
843 timer_ticks_per_nsec_quotient = 843 timer_ticks_per_nsec_quotient =
844 clocksource_hz2mult(clock, SPARC64_NSEC_PER_CYC_SHIFT); 844 clocksource_hz2mult(freq, SPARC64_NSEC_PER_CYC_SHIFT);
845 845
846 clocksource_tick.name = tick_ops->name; 846 clocksource_tick.name = tick_ops->name;
847 clocksource_tick.mult = 847 clocksource_tick.mult =
848 clocksource_hz2mult(clock, 848 clocksource_hz2mult(freq,
849 clocksource_tick.shift); 849 clocksource_tick.shift);
850 clocksource_tick.read = tick_ops->get_tick; 850 clocksource_tick.read = tick_ops->get_tick;
851 851
@@ -856,7 +856,7 @@ void __init time_init(void)
856 856
857 sparc64_clockevent.name = tick_ops->name; 857 sparc64_clockevent.name = tick_ops->name;
858 858
859 setup_clockevent_multiplier(clock); 859 setup_clockevent_multiplier(freq);
860 860
861 sparc64_clockevent.max_delta_ns = 861 sparc64_clockevent.max_delta_ns =
862 clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent); 862 clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent);