Browse Source

drivers: timer: Explicitly setting argument as unused

Marking as unused (ARG_UNUSED) the parameter device in the
initialization function z_clock_driver_init when it is not used.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
pull/27839/head
Flavio Ceolin 6 years ago committed by Anas Nashif
parent
commit
e1e4a402e2
  1. 2
      drivers/timer/apic_timer.c
  2. 2
      drivers/timer/cortex_m_systick.c
  3. 2
      drivers/timer/hpet.c
  4. 2
      drivers/timer/riscv_machine_timer.c
  5. 2
      drivers/timer/sys_clock_init.c
  6. 2
      drivers/timer/xtensa_sys_timer.c

2
drivers/timer/apic_timer.c

@ -217,6 +217,8 @@ int z_clock_driver_init(struct device *device) @@ -217,6 +217,8 @@ int z_clock_driver_init(struct device *device)
{
uint32_t val;
ARG_UNUSED(device);
val = x86_read_loapic(LOAPIC_TIMER_CONFIG); /* set divider */
val &= ~DCR_DIVIDER_MASK;
val |= DCR_DIVIDER;

2
drivers/timer/cortex_m_systick.c

@ -151,6 +151,8 @@ void z_clock_isr(void *arg) @@ -151,6 +151,8 @@ void z_clock_isr(void *arg)
int z_clock_driver_init(struct device *device)
{
ARG_UNUSED(device);
NVIC_SetPriority(SysTick_IRQn, _IRQ_PRIO_OFFSET);
last_load = CYC_PER_TICK - 1;
overflow_cyc = 0U;

2
drivers/timer/hpet.c

@ -121,6 +121,8 @@ int z_clock_driver_init(struct device *device) @@ -121,6 +121,8 @@ int z_clock_driver_init(struct device *device)
extern int z_clock_hw_cycles_per_sec;
uint32_t hz;
ARG_UNUSED(device);
DEVICE_MMIO_TOPLEVEL_MAP(hpet_regs, K_MEM_CACHE_NONE);
IRQ_CONNECT(DT_INST_IRQN(0),

2
drivers/timer/riscv_machine_timer.c

@ -81,6 +81,8 @@ static void timer_isr(void *arg) @@ -81,6 +81,8 @@ static void timer_isr(void *arg)
int z_clock_driver_init(struct device *device)
{
ARG_UNUSED(device);
IRQ_CONNECT(RISCV_MACHINE_TIMER_IRQ, 0, timer_isr, NULL, 0);
last_count = mtime();
set_mtimecmp(last_count + CYC_PER_TICK);

2
drivers/timer/sys_clock_init.c

@ -25,6 +25,8 @@ void __weak z_clock_isr(void *arg) @@ -25,6 +25,8 @@ void __weak z_clock_isr(void *arg)
int __weak z_clock_driver_init(struct device *device)
{
ARG_UNUSED(device);
return 0;
}

2
drivers/timer/xtensa_sys_timer.c

@ -59,6 +59,8 @@ static void ccompare_isr(void *arg) @@ -59,6 +59,8 @@ static void ccompare_isr(void *arg)
int z_clock_driver_init(struct device *device)
{
ARG_UNUSED(device);
IRQ_CONNECT(TIMER_IRQ, 0, ccompare_isr, 0, 0);
set_ccompare(ccount() + CYC_PER_TICK);
irq_enable(TIMER_IRQ);

Loading…
Cancel
Save