diff options
author | Venki Pallipadi <venkatesh.pallipadi@intel.com> | 2008-09-24 13:03:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:53:12 -0400 |
commit | 5f79f2f2ad39b5177c52ed08ffd066ea0c1da924 (patch) | |
tree | 89ef9fdf2c0053fcb07cf2ba470597f3386df51b /arch/x86 | |
parent | c81bba49a13cb3376654d0cc93dc069fd619ed76 (diff) |
hpet: clean up warning
Fix the below compile warnings due to recent HPET MSI changes
arch/x86/kernel/hpet.c:48: warning: 'hpet_devs' defined but not used
arch/x86/kernel/hpet.c:50: warning: 'per_cpu__cpu_hpet_dev' defined but not used
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/hpet.c | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 2913913f4a46..77017e834cf7 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -45,10 +45,6 @@ struct hpet_dev { | |||
45 | char name[10]; | 45 | char name[10]; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static struct hpet_dev *hpet_devs; | ||
49 | |||
50 | static DEFINE_PER_CPU(struct hpet_dev *, cpu_hpet_dev); | ||
51 | |||
52 | unsigned long hpet_readl(unsigned long a) | 48 | unsigned long hpet_readl(unsigned long a) |
53 | { | 49 | { |
54 | return readl(hpet_virt_address + a); | 50 | return readl(hpet_virt_address + a); |
@@ -126,23 +122,8 @@ EXPORT_SYMBOL_GPL(is_hpet_enabled); | |||
126 | * timer 0 and timer 1 in case of RTC emulation. | 122 | * timer 0 and timer 1 in case of RTC emulation. |
127 | */ | 123 | */ |
128 | #ifdef CONFIG_HPET | 124 | #ifdef CONFIG_HPET |
129 | static void hpet_reserve_msi_timers(struct hpet_data *hd) | ||
130 | { | ||
131 | int i; | ||
132 | 125 | ||
133 | if (!hpet_devs) | 126 | static void hpet_reserve_msi_timers(struct hpet_data *hd); |
134 | return; | ||
135 | |||
136 | for (i = 0; i < hpet_num_timers; i++) { | ||
137 | struct hpet_dev *hdev = &hpet_devs[i]; | ||
138 | |||
139 | if (!(hdev->flags & HPET_DEV_VALID)) | ||
140 | continue; | ||
141 | |||
142 | hd->hd_irq[hdev->num] = hdev->irq; | ||
143 | hpet_reserve_timer(hd, hdev->num); | ||
144 | } | ||
145 | } | ||
146 | 127 | ||
147 | static void hpet_reserve_platform_timers(unsigned long id) | 128 | static void hpet_reserve_platform_timers(unsigned long id) |
148 | { | 129 | { |
@@ -362,6 +343,10 @@ static int hpet_legacy_next_event(unsigned long delta, | |||
362 | * HPET MSI Support | 343 | * HPET MSI Support |
363 | */ | 344 | */ |
364 | #ifdef CONFIG_PCI_MSI | 345 | #ifdef CONFIG_PCI_MSI |
346 | |||
347 | static DEFINE_PER_CPU(struct hpet_dev *, cpu_hpet_dev); | ||
348 | static struct hpet_dev *hpet_devs; | ||
349 | |||
365 | void hpet_msi_unmask(unsigned int irq) | 350 | void hpet_msi_unmask(unsigned int irq) |
366 | { | 351 | { |
367 | struct hpet_dev *hdev = get_irq_data(irq); | 352 | struct hpet_dev *hdev = get_irq_data(irq); |
@@ -525,7 +510,8 @@ static void init_one_hpet_msi_clockevent(struct hpet_dev *hdev, int cpu) | |||
525 | #else | 510 | #else |
526 | #define RESERVE_TIMERS 0 | 511 | #define RESERVE_TIMERS 0 |
527 | #endif | 512 | #endif |
528 | void hpet_msi_capability_lookup(unsigned int start_timer) | 513 | |
514 | static void hpet_msi_capability_lookup(unsigned int start_timer) | ||
529 | { | 515 | { |
530 | unsigned int id; | 516 | unsigned int id; |
531 | unsigned int num_timers; | 517 | unsigned int num_timers; |
@@ -571,6 +557,26 @@ void hpet_msi_capability_lookup(unsigned int start_timer) | |||
571 | num_timers, num_timers_used); | 557 | num_timers, num_timers_used); |
572 | } | 558 | } |
573 | 559 | ||
560 | #ifdef CONFIG_HPET | ||
561 | static void hpet_reserve_msi_timers(struct hpet_data *hd) | ||
562 | { | ||
563 | int i; | ||
564 | |||
565 | if (!hpet_devs) | ||
566 | return; | ||
567 | |||
568 | for (i = 0; i < hpet_num_timers; i++) { | ||
569 | struct hpet_dev *hdev = &hpet_devs[i]; | ||
570 | |||
571 | if (!(hdev->flags & HPET_DEV_VALID)) | ||
572 | continue; | ||
573 | |||
574 | hd->hd_irq[hdev->num] = hdev->irq; | ||
575 | hpet_reserve_timer(hd, hdev->num); | ||
576 | } | ||
577 | } | ||
578 | #endif | ||
579 | |||
574 | static struct hpet_dev *hpet_get_unused_timer(void) | 580 | static struct hpet_dev *hpet_get_unused_timer(void) |
575 | { | 581 | { |
576 | int i; | 582 | int i; |
@@ -642,10 +648,17 @@ static int hpet_setup_msi_irq(unsigned int irq) | |||
642 | { | 648 | { |
643 | return 0; | 649 | return 0; |
644 | } | 650 | } |
645 | void hpet_msi_capability_lookup(unsigned int start_timer) | 651 | static void hpet_msi_capability_lookup(unsigned int start_timer) |
652 | { | ||
653 | return; | ||
654 | } | ||
655 | |||
656 | #ifdef CONFIG_HPET | ||
657 | static void hpet_reserve_msi_timers(struct hpet_data *hd) | ||
646 | { | 658 | { |
647 | return; | 659 | return; |
648 | } | 660 | } |
661 | #endif | ||
649 | 662 | ||
650 | static int hpet_cpuhp_notify(struct notifier_block *n, | 663 | static int hpet_cpuhp_notify(struct notifier_block *n, |
651 | unsigned long action, void *hcpu) | 664 | unsigned long action, void *hcpu) |