Skip to contentSkip to conversation

ARM: psci: fix warning on psci_init if ARM_PSCI is undefined

PATCH New Christian Engelmayer 2 participants 3 messages May 27, 2014 – May 28, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: psci: fix warning on psci_init if ARM_PSCI is undefined

Commit e71246a (PSCI: Add initial support for PSCIv0.2 functions) changed the return type of function psci_init() from void to int, but left the static inline stub used if CONFIG_ARM_PSCI is not defined otherwise untouched. This results in minor compile warning "warning: no return statement in function returning non-void [-Wreturn-type]". The return value is currently not evaluated by the only caller anyway.

---
Compile tested only. Applies against branch next in tree
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git

---
 arch/arm/include/asm/psci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/psci.h +1 -1
index b93e34a..c25ef3e 100644
@@ -41,7 +41,7 @@ extern struct smp_operations psci_smp_ops;
 int psci_init(void);
 bool psci_smp_available(void);
 #else
-static inline int psci_init(void) { }
+static inline int psci_init(void) { return 0; }
 static inline bool psci_smp_available(void) { return false; }
 #endif
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: psci: fix warning on psci_init if ARM_PSCI is undefined

Quoted 11 lines · Christian Engelmayer

Commit e71246a (PSCI: Add initial support for PSCIv0.2 functions) changed the return type of function psci_init() from void to int, but left the static inline stub used if CONFIG_ARM_PSCI is not defined otherwise untouched. This results in minor compile warning "warning: no return statement in function returning non-void [-Wreturn-type]". The return value is currently not evaluated by the only caller anyway.

---
Compile tested only. Applies against branch next in tree
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git

I sent out a fix for this yesterday as well, think Paolo was going to apply that one:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/260009.html

Thanks,
-Christoffer

#2 lore raw

PATCH 1/1 ARM: psci: fix warning on psci_init if ARM_PSCI is undefined

Quoted 8 lines · Christoffer Dall
Quoted 7 lines · Christian Engelmayer

Commit e71246a (PSCI: Add initial support for PSCIv0.2 functions) changed the return type of function psci_init() from void to int, but left the static inline stub used if CONFIG_ARM_PSCI is not defined otherwise untouched. This results in minor compile warning "warning: no return statement in function returning non-void [-Wreturn-type]". The return value is currently not evaluated by the only caller anyway.

Quoted 8 lines
Quoted 4 lines

---
Compile tested only. Applies against branch next in tree
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git

I sent out a fix for this yesterday as well, think Paolo was going to apply that one:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/260009.html

Thanks for letting me know Christoffer! I missed that when checking for already submitted patches for this. Both patches only differ in the commit log message, so it's fine either way.

Regards,
Christian