Skip to content

Commit

Permalink
x86/hpet: Remove unused parameter from hpet_next_event()
Browse files Browse the repository at this point in the history
The clockevent device pointer is not used in this function.

While at it, rename the misnamed 'timer' parameter to 'channel', which makes it
clear what this parameter means.

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Ravi Shankar <ravi.v.shankar@intel.com>
Link: https://lkml.kernel.org/r/20190623132434.447880978@linutronix.de
  • Loading branch information
Thomas Gleixner committed Jun 27, 2019
1 parent 7c4b0e0 commit 853acaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/x86/kernel/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,14 @@ static int hpet_resume(struct clock_event_device *evt)
return 0;
}

static int hpet_next_event(unsigned long delta,
struct clock_event_device *evt, int timer)
static int hpet_next_event(unsigned long delta, int channel)
{
u32 cnt;
s32 res;

cnt = hpet_readl(HPET_COUNTER);
cnt += (u32) delta;
hpet_writel(cnt, HPET_Tn_CMP(timer));
hpet_writel(cnt, HPET_Tn_CMP(channel));

/*
* HPETs are a complete disaster. The compare register is
Expand Down Expand Up @@ -407,7 +406,7 @@ static int hpet_legacy_resume(struct clock_event_device *evt)
static int hpet_legacy_next_event(unsigned long delta,
struct clock_event_device *evt)
{
return hpet_next_event(delta, evt, 0);
return hpet_next_event(delta, 0);
}

/*
Expand Down Expand Up @@ -508,7 +507,8 @@ static int hpet_msi_next_event(unsigned long delta,
struct clock_event_device *evt)
{
struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt);
return hpet_next_event(delta, evt, hdev->num);

return hpet_next_event(delta, hdev->num);
}

static irqreturn_t hpet_interrupt_handler(int irq, void *data)
Expand Down

0 comments on commit 853acaf

Please sign in to comment.