2014-12-20 22:39:48

by Rickard Strandqvist

[permalink] [raw]
Subject: [PATCH] arch: powerpc: platforms: embedded6xx: mpc7448_hpc2.c: Remove some unused functions

Removes some functions that are not used anywhere:
mpc7448_hpc2_halt() mpc7448_hpc2_power_off()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <[email protected]>
---
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index beeaf4a..df4ad95 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -156,17 +156,6 @@ void mpc7448_hpc2_restart(char *cmd)
for (;;) ; /* Spin until reset happens */
}

-void mpc7448_hpc2_power_off(void)
-{
- local_irq_disable();
- for (;;) ; /* No way to shut power off with software */
-}
-
-void mpc7448_hpc2_halt(void)
-{
- mpc7448_hpc2_power_off();
-}
-
/*
* Called very early, device-tree isn't unflattened
*/
--
1.7.10.4


2014-12-22 02:56:45

by Michael Ellerman

[permalink] [raw]
Subject: Re: arch: powerpc: platforms: embedded6xx: mpc7448_hpc2.c: Remove some unused functions

On Sat, 2014-20-12 at 22:42:32 UTC, Rickard Strandqvist wrote:
> Removes some functions that are not used anywhere:
> mpc7448_hpc2_halt() mpc7448_hpc2_power_off()

The other option would be to wire it up.

But the default implementations do more or less the same thing.

As far as I can see these were introduced in c5d56332fd6c "[POWERPC] Add
general support for mpc7448hpc2 (Taiga) platform" and never used.

cheers