diff options
| author | Arnd Bergmann <[email protected]> | 2017-04-19 17:37:09 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2017-04-20 12:56:59 +0000 |
| commit | eb64522100a1d4adc89bce11b935a30c4401e234 (patch) | |
| tree | 42cecaec5f97b5c42bb36f0423d4c323a596618d /drivers/clocksource/arm_arch_timer.c | |
| parent | Clocksource/mips-gic: Remove redundant non devicetree init (diff) | |
| download | kernel-eb64522100a1d4adc89bce11b935a30c4401e234.tar.gz kernel-eb64522100a1d4adc89bce11b935a30c4401e234.zip | |
arm64/arch_timer: Mark errata handlers as __maybe_unused
In some rare randconfig builds, we end up with two functions being entirely
unused:
drivers/clocksource/arm_arch_timer.c:342:12: error: 'erratum_set_next_event_tval_phys' defined but not used [-Werror=unused-function]
static int erratum_set_next_event_tval_phys(unsigned long evt,
drivers/clocksource/arm_arch_timer.c:335:12: error: 'erratum_set_next_event_tval_virt' defined but not used [-Werror=unused-function]
static int erratum_set_next_event_tval_virt(unsigned long evt,
We could add an #ifdef around them, but we would already have to check for
several symbols there and there is a chance this would get more complicated
over time, so marking them as __maybe_unused is the simplest way to avoid the
harmless warnings.
Fixes: 01d3e3ff2608 ("arm64: arch_timer: Rework the set_next_event workarounds")
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Cc: Christoffer Dall <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
| -rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 2208fa4eafee..a1fb918b8021 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -324,14 +324,14 @@ static void erratum_set_next_event_tval_generic(const int access, unsigned long arch_timer_reg_write(access, ARCH_TIMER_REG_CTRL, ctrl, clk); } -static int erratum_set_next_event_tval_virt(unsigned long evt, +static __maybe_unused int erratum_set_next_event_tval_virt(unsigned long evt, struct clock_event_device *clk) { erratum_set_next_event_tval_generic(ARCH_TIMER_VIRT_ACCESS, evt, clk); return 0; } -static int erratum_set_next_event_tval_phys(unsigned long evt, +static __maybe_unused int erratum_set_next_event_tval_phys(unsigned long evt, struct clock_event_device *clk) { erratum_set_next_event_tval_generic(ARCH_TIMER_PHYS_ACCESS, evt, clk); |
