* [PATCH] arm: mach-versatile: core: Remove unused function
@ 2015-01-03 16:52 ` Rickard Strandqvist
0 siblings, 0 replies; 6+ messages in thread
From: Rickard Strandqvist @ 2015-01-03 16:52 UTC (permalink / raw)
To: Russell King, Linus Walleij
Cc: Rickard Strandqvist, Tomi Valkeinen, linux-arm-kernel, linux-kernel
Remove the function versatile_leds_event() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
arch/arm/mach-versatile/core.c | 37 -------------------------------------
1 file changed, 37 deletions(-)
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 08fb8c8..6ea09fe 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -728,43 +728,6 @@ struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = {
};
#endif
-#ifdef CONFIG_LEDS
-#define VA_LEDS_BASE (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
-
-static void versatile_leds_event(led_event_t ledevt)
-{
- unsigned long flags;
- u32 val;
-
- local_irq_save(flags);
- val = readl(VA_LEDS_BASE);
-
- switch (ledevt) {
- case led_idle_start:
- val = val & ~VERSATILE_SYS_LED0;
- break;
-
- case led_idle_end:
- val = val | VERSATILE_SYS_LED0;
- break;
-
- case led_timer:
- val = val ^ VERSATILE_SYS_LED1;
- break;
-
- case led_halted:
- val = 0;
- break;
-
- default:
- break;
- }
-
- writel(val, VA_LEDS_BASE);
- local_irq_restore(flags);
-}
-#endif /* CONFIG_LEDS */
-
void versatile_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] arm: mach-versatile: core: Remove unused function
@ 2015-01-03 16:52 ` Rickard Strandqvist
0 siblings, 0 replies; 6+ messages in thread
From: Rickard Strandqvist @ 2015-01-03 16:52 UTC (permalink / raw)
To: linux-arm-kernel
Remove the function versatile_leds_event() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
arch/arm/mach-versatile/core.c | 37 -------------------------------------
1 file changed, 37 deletions(-)
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 08fb8c8..6ea09fe 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -728,43 +728,6 @@ struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = {
};
#endif
-#ifdef CONFIG_LEDS
-#define VA_LEDS_BASE (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
-
-static void versatile_leds_event(led_event_t ledevt)
-{
- unsigned long flags;
- u32 val;
-
- local_irq_save(flags);
- val = readl(VA_LEDS_BASE);
-
- switch (ledevt) {
- case led_idle_start:
- val = val & ~VERSATILE_SYS_LED0;
- break;
-
- case led_idle_end:
- val = val | VERSATILE_SYS_LED0;
- break;
-
- case led_timer:
- val = val ^ VERSATILE_SYS_LED1;
- break;
-
- case led_halted:
- val = 0;
- break;
-
- default:
- break;
- }
-
- writel(val, VA_LEDS_BASE);
- local_irq_restore(flags);
-}
-#endif /* CONFIG_LEDS */
-
void versatile_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: mach-versatile: core: Remove unused function
2015-01-03 16:52 ` Rickard Strandqvist
@ 2015-01-14 11:53 ` Linus Walleij
-1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2015-01-14 11:53 UTC (permalink / raw)
To: Rickard Strandqvist, arm, Bryan Wu
Cc: Russell King, Tomi Valkeinen, linux-arm-kernel, linux-kernel
On Sat, Jan 3, 2015 at 5:52 PM, Rickard Strandqvist
<rickard_strandqvist@spectrumdigital.se> wrote:
> Remove the function versatile_leds_event() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
That's right, the code was made redundant in
commit e031cd513ec2ff661465dc1198220075719e72d1
"ARM: mach-realview and mach-versatile: retire custom LED code"
ARM SoC folks: I suggest you apply this patch directly to your cleanup
branch.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: mach-versatile: core: Remove unused function
@ 2015-01-14 11:53 ` Linus Walleij
0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2015-01-14 11:53 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Jan 3, 2015 at 5:52 PM, Rickard Strandqvist
<rickard_strandqvist@spectrumdigital.se> wrote:
> Remove the function versatile_leds_event() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
That's right, the code was made redundant in
commit e031cd513ec2ff661465dc1198220075719e72d1
"ARM: mach-realview and mach-versatile: retire custom LED code"
ARM SoC folks: I suggest you apply this patch directly to your cleanup
branch.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: mach-versatile: core: Remove unused function
2015-01-14 11:53 ` Linus Walleij
@ 2015-01-15 1:29 ` Olof Johansson
-1 siblings, 0 replies; 6+ messages in thread
From: Olof Johansson @ 2015-01-15 1:29 UTC (permalink / raw)
To: Linus Walleij
Cc: Rickard Strandqvist, arm, Bryan Wu, Russell King, Tomi Valkeinen,
linux-arm-kernel, linux-kernel
On Wed, Jan 14, 2015 at 12:53:07PM +0100, Linus Walleij wrote:
> On Sat, Jan 3, 2015 at 5:52 PM, Rickard Strandqvist
> <rickard_strandqvist@spectrumdigital.se> wrote:
>
> > Remove the function versatile_leds_event() that is not used anywhere.
> >
> > This was partially found by using a static code analysis program called cppcheck.
> >
> > Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> That's right, the code was made redundant in
> commit e031cd513ec2ff661465dc1198220075719e72d1
> "ARM: mach-realview and mach-versatile: retire custom LED code"
>
> ARM SoC folks: I suggest you apply this patch directly to your cleanup
> branch.
Thanks, applied with a minor tweak to the patch subject.
-Olof
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: mach-versatile: core: Remove unused function
@ 2015-01-15 1:29 ` Olof Johansson
0 siblings, 0 replies; 6+ messages in thread
From: Olof Johansson @ 2015-01-15 1:29 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 14, 2015 at 12:53:07PM +0100, Linus Walleij wrote:
> On Sat, Jan 3, 2015 at 5:52 PM, Rickard Strandqvist
> <rickard_strandqvist@spectrumdigital.se> wrote:
>
> > Remove the function versatile_leds_event() that is not used anywhere.
> >
> > This was partially found by using a static code analysis program called cppcheck.
> >
> > Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> That's right, the code was made redundant in
> commit e031cd513ec2ff661465dc1198220075719e72d1
> "ARM: mach-realview and mach-versatile: retire custom LED code"
>
> ARM SoC folks: I suggest you apply this patch directly to your cleanup
> branch.
Thanks, applied with a minor tweak to the patch subject.
-Olof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-15 1:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-03 16:52 [PATCH] arm: mach-versatile: core: Remove unused function Rickard Strandqvist
2015-01-03 16:52 ` Rickard Strandqvist
2015-01-14 11:53 ` Linus Walleij
2015-01-14 11:53 ` Linus Walleij
2015-01-15 1:29 ` Olof Johansson
2015-01-15 1:29 ` Olof Johansson
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.