diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-12 02:39:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-12 02:39:11 -0400 |
commit | d8ada0a2cd11c991d8193a3f7d37f1806c93c4a0 (patch) | |
tree | 6bf0fa254292ca0368ea930a1a1d89199a839f9c | |
parent | b0f1e7962f93a78630161c7c9fc263de43c101ac (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>
-rw-r--r-- | arch/sparc64/kernel/time.c | 22 |
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) | |||
409 | unsigned long cmos_regs; | 409 | unsigned long cmos_regs; |
410 | EXPORT_SYMBOL(cmos_regs); | 410 | EXPORT_SYMBOL(cmos_regs); |
411 | 411 | ||
412 | struct resource rtc_cmos_resource; | 412 | static struct resource rtc_cmos_resource; |
413 | 413 | ||
414 | static struct platform_device rtc_cmos_device = { | 414 | static struct platform_device rtc_cmos_device = { |
415 | .name = "rtc_cmos", | 415 | .name = "rtc_cmos", |
@@ -621,7 +621,7 @@ fs_initcall(clock_init); | |||
621 | static unsigned long sparc64_init_timers(void) | 621 | static 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 | ||
650 | struct freq_table { | 650 | struct freq_table { |
@@ -836,16 +836,16 @@ EXPORT_SYMBOL(udelay); | |||
836 | 836 | ||
837 | void __init time_init(void) | 837 | void __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); |