summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/tau_6xx.c
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2018-04-04 22:10:28 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2018-05-25 04:04:43 +0200
commitbd13ac95f954570e01fba5a6caf771da754ac0e3 (patch)
tree1ac506baeca8a2f9aeb2120238cde64030de4a07 /arch/powerpc/kernel/tau_6xx.c
parentpowerpc: Add missing prototype (diff)
downloadlinux-bd13ac95f954570e01fba5a6caf771da754ac0e3.tar.xz
linux-bd13ac95f954570e01fba5a6caf771da754ac0e3.zip
powerpc/tau: Synchronize function prototypes and body
Some function prototypes and body for Thermal Assist Units were not in sync. Update the function definition to match the existing function declaration found in `setup-common.c`, changing an `int` return type to a `u32` return type. Move the prototypes to a header file. Fix the following warnings, treated as error with W=1: arch/powerpc/kernel/tau_6xx.c:257:5: error: no previous prototype for ‘cpu_temp_both’ [-Werror=missing-prototypes] arch/powerpc/kernel/tau_6xx.c:262:5: error: no previous prototype for ‘cpu_temp’ [-Werror=missing-prototypes] arch/powerpc/kernel/tau_6xx.c:267:5: error: no previous prototype for ‘tau_interrupts’ [-Werror=missing-prototypes] Compile tested with CONFIG_TAU_INT. Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/tau_6xx.c')
-rw-r--r--arch/powerpc/kernel/tau_6xx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c
index 8cdd852aedd1..8f02353c049e 100644
--- a/arch/powerpc/kernel/tau_6xx.c
+++ b/arch/powerpc/kernel/tau_6xx.c
@@ -27,6 +27,9 @@
#include <asm/cache.h>
#include <asm/8xx_immap.h>
#include <asm/machdep.h>
+#include <asm/asm-prototypes.h>
+
+#include "setup.h"
static struct tau_temp
{
@@ -259,12 +262,12 @@ u32 cpu_temp_both(unsigned long cpu)
return ((tau[cpu].high << 16) | tau[cpu].low);
}
-int cpu_temp(unsigned long cpu)
+u32 cpu_temp(unsigned long cpu)
{
return ((tau[cpu].high + tau[cpu].low) / 2);
}
-int tau_interrupts(unsigned long cpu)
+u32 tau_interrupts(unsigned long cpu)
{
return (tau[cpu].interrupts);
}