* [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused
@ 2017-04-19 17:37 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2017-04-19 17:37 UTC (permalink / raw)
To: linux-arm-kernel
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 <arnd@arndb.de>
---
drivers/clocksource/arm_arch_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 74183a7315ac..968ca3a9ee36 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -332,14 +332,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);
--
2.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused
@ 2017-04-19 17:37 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2017-04-19 17:37 UTC (permalink / raw)
To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
Cc: Arnd Bergmann, Christoffer Dall, Will Deacon, linux-arm-kernel,
linux-kernel
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 <arnd@arndb.de>
---
drivers/clocksource/arm_arch_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 74183a7315ac..968ca3a9ee36 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -332,14 +332,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);
--
2.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused
2017-04-19 17:37 ` Arnd Bergmann
@ 2017-04-19 18:03 ` Marc Zyngier
-1 siblings, 0 replies; 7+ messages in thread
From: Marc Zyngier @ 2017-04-19 18:03 UTC (permalink / raw)
To: linux-arm-kernel
On 19/04/17 18:37, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
Ah, well spotted. You need CONFIG_ARM64_ERRATUM_858921, but none of
CONFIG_HISILICON_ERRATUM_161010101 or CONFIG_FSL_ERRATUM_A008585.
Dreadful stuff.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused
@ 2017-04-19 18:03 ` Marc Zyngier
0 siblings, 0 replies; 7+ messages in thread
From: Marc Zyngier @ 2017-04-19 18:03 UTC (permalink / raw)
To: Arnd Bergmann, Mark Rutland, Daniel Lezcano, Thomas Gleixner
Cc: Christoffer Dall, Will Deacon, linux-arm-kernel, linux-kernel
On 19/04/17 18:37, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
Ah, well spotted. You need CONFIG_ARM64_ERRATUM_858921, but none of
CONFIG_HISILICON_ERRATUM_161010101 or CONFIG_FSL_ERRATUM_A008585.
Dreadful stuff.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused
2017-04-19 17:37 ` Arnd Bergmann
@ 2017-04-19 18:12 ` Daniel Lezcano
-1 siblings, 0 replies; 7+ messages in thread
From: Daniel Lezcano @ 2017-04-19 18:12 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Apr 19, 2017 at 07:37:09PM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> ---
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused
@ 2017-04-19 18:12 ` Daniel Lezcano
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Lezcano @ 2017-04-19 18:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mark Rutland, Marc Zyngier, Thomas Gleixner, Christoffer Dall,
Will Deacon, linux-arm-kernel, linux-kernel
On Wed, Apr 19, 2017 at 07:37:09PM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> ---
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip:timers/core] arm64/arch_timer: Mark errata handlers as __maybe_unused
2017-04-19 17:37 ` Arnd Bergmann
` (2 preceding siblings ...)
(?)
@ 2017-04-20 13:14 ` tip-bot for Arnd Bergmann
-1 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Arnd Bergmann @ 2017-04-20 13:14 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux-kernel, will.deacon, hpa, daniel.lezcano,
marc.zyngier, mark.rutland, arnd, tglx, christoffer.dall
Commit-ID: eb64522100a1d4adc89bce11b935a30c4401e234
Gitweb: http://git.kernel.org/tip/eb64522100a1d4adc89bce11b935a30c4401e234
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Wed, 19 Apr 2017 19:37:09 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 20 Apr 2017 14:56:59 +0200
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 <arnd@arndb.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Link: http://lkml.kernel.org/r/20170419173737.3846098-1-arnd@arndb.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/clocksource/arm_arch_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 2208fa4..a1fb918 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);
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-04-20 13:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19 17:37 [PATCH] arm64: arch_timer: mark errata handlers as __maybe_unused Arnd Bergmann
2017-04-19 17:37 ` Arnd Bergmann
2017-04-19 18:03 ` Marc Zyngier
2017-04-19 18:03 ` Marc Zyngier
2017-04-19 18:12 ` Daniel Lezcano
2017-04-19 18:12 ` Daniel Lezcano
2017-04-20 13:14 ` [tip:timers/core] arm64/arch_timer: Mark " tip-bot for Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.