Commit 5f79f2f2 authored by Venki Pallipadi's avatar Venki Pallipadi Committed by Ingo Molnar

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent c81bba49
...@@ -45,10 +45,6 @@ struct hpet_dev { ...@@ -45,10 +45,6 @@ struct hpet_dev {
char name[10]; char name[10];
}; };
static struct hpet_dev *hpet_devs;
static DEFINE_PER_CPU(struct hpet_dev *, cpu_hpet_dev);
unsigned long hpet_readl(unsigned long a) unsigned long hpet_readl(unsigned long a)
{ {
return readl(hpet_virt_address + a); return readl(hpet_virt_address + a);
...@@ -126,23 +122,8 @@ EXPORT_SYMBOL_GPL(is_hpet_enabled); ...@@ -126,23 +122,8 @@ EXPORT_SYMBOL_GPL(is_hpet_enabled);
* timer 0 and timer 1 in case of RTC emulation. * timer 0 and timer 1 in case of RTC emulation.
*/ */
#ifdef CONFIG_HPET #ifdef CONFIG_HPET
static void hpet_reserve_msi_timers(struct hpet_data *hd)
{
int i;
if (!hpet_devs)
return;
for (i = 0; i < hpet_num_timers; i++) {
struct hpet_dev *hdev = &hpet_devs[i];
if (!(hdev->flags & HPET_DEV_VALID)) static void hpet_reserve_msi_timers(struct hpet_data *hd);
continue;
hd->hd_irq[hdev->num] = hdev->irq;
hpet_reserve_timer(hd, hdev->num);
}
}
static void hpet_reserve_platform_timers(unsigned long id) static void hpet_reserve_platform_timers(unsigned long id)
{ {
...@@ -362,6 +343,10 @@ static int hpet_legacy_next_event(unsigned long delta, ...@@ -362,6 +343,10 @@ static int hpet_legacy_next_event(unsigned long delta,
* HPET MSI Support * HPET MSI Support
*/ */
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
static DEFINE_PER_CPU(struct hpet_dev *, cpu_hpet_dev);
static struct hpet_dev *hpet_devs;
void hpet_msi_unmask(unsigned int irq) void hpet_msi_unmask(unsigned int irq)
{ {
struct hpet_dev *hdev = get_irq_data(irq); 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,7 +510,8 @@ static void init_one_hpet_msi_clockevent(struct hpet_dev *hdev, int cpu)
#else #else
#define RESERVE_TIMERS 0 #define RESERVE_TIMERS 0
#endif #endif
void hpet_msi_capability_lookup(unsigned int start_timer)
static void hpet_msi_capability_lookup(unsigned int start_timer)
{ {
unsigned int id; unsigned int id;
unsigned int num_timers; unsigned int num_timers;
...@@ -571,6 +557,26 @@ void hpet_msi_capability_lookup(unsigned int start_timer) ...@@ -571,6 +557,26 @@ void hpet_msi_capability_lookup(unsigned int start_timer)
num_timers, num_timers_used); num_timers, num_timers_used);
} }
#ifdef CONFIG_HPET
static void hpet_reserve_msi_timers(struct hpet_data *hd)
{
int i;
if (!hpet_devs)
return;
for (i = 0; i < hpet_num_timers; i++) {
struct hpet_dev *hdev = &hpet_devs[i];
if (!(hdev->flags & HPET_DEV_VALID))
continue;
hd->hd_irq[hdev->num] = hdev->irq;
hpet_reserve_timer(hd, hdev->num);
}
}
#endif
static struct hpet_dev *hpet_get_unused_timer(void) static struct hpet_dev *hpet_get_unused_timer(void)
{ {
int i; int i;
...@@ -642,11 +648,18 @@ static int hpet_setup_msi_irq(unsigned int irq) ...@@ -642,11 +648,18 @@ static int hpet_setup_msi_irq(unsigned int irq)
{ {
return 0; return 0;
} }
void hpet_msi_capability_lookup(unsigned int start_timer) static void hpet_msi_capability_lookup(unsigned int start_timer)
{ {
return; return;
} }
#ifdef CONFIG_HPET
static void hpet_reserve_msi_timers(struct hpet_data *hd)
{
return;
}
#endif
static int hpet_cpuhp_notify(struct notifier_block *n, static int hpet_cpuhp_notify(struct notifier_block *n,
unsigned long action, void *hcpu) unsigned long action, void *hcpu)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment