From c2a77187deb7227a63bb9d9a5609afb175d28be2 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Mon, 12 Dec 2011 13:52:17 -0800 Subject: [PATCH] msm: scm: Mark scm_call_atomic*() return value as signed scm_call_atomic*() can return a negative 32 bit value indicating an error. Change the function signature to indicate that this is possible. Change-Id: I633bb521410f9a07495ec5e73e3a8b0e9adb7af1 Signed-off-by: Stephen Boyd --- arch/arm/mach-msm/include/mach/scm.h | 8 ++++---- arch/arm/mach-msm/scm.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-msm/include/mach/scm.h b/arch/arm/mach-msm/include/mach/scm.h index e511b2e8157..a332b677ab7 100644 --- a/arch/arm/mach-msm/include/mach/scm.h +++ b/arch/arm/mach-msm/include/mach/scm.h @@ -27,8 +27,8 @@ extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len, void *resp_buf, size_t resp_len); -extern u32 scm_call_atomic1(u32 svc, u32 cmd, u32 arg1); -extern u32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2); +extern s32 scm_call_atomic1(u32 svc, u32 cmd, u32 arg1); +extern s32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2); #define SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF)) @@ -43,12 +43,12 @@ static inline int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, return 0; } -static inline u32 scm_call_atomic1(u32 svc, u32 cmd, u32 arg1) +static inline s32 scm_call_atomic1(u32 svc, u32 cmd, u32 arg1) { return 0; } -static inline u32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2) +static inline s32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2) { return 0; } diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index 19f7290c62e..6794a88801a 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c @@ -282,7 +282,7 @@ EXPORT_SYMBOL(scm_call); * This shall only be used with commands that are guaranteed to be * uninterruptable, atomic and SMP safe. */ -u32 scm_call_atomic1(u32 svc, u32 cmd, u32 arg1) +s32 scm_call_atomic1(u32 svc, u32 cmd, u32 arg1) { int context_id; register u32 r0 asm("r0") = SCM_ATOMIC(svc, cmd, 1); @@ -312,7 +312,7 @@ EXPORT_SYMBOL(scm_call_atomic1); * This shall only be used with commands that are guaranteed to be * uninterruptable, atomic and SMP safe. */ -u32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2) +s32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2) { int context_id; register u32 r0 asm("r0") = SCM_ATOMIC(svc, cmd, 2);