diff mbox

[1/9] ARM: cpuidle: remove useless declaration

Message ID 1364553095-25110-1-git-send-email-daniel.lezcano@linaro.org
State New
Headers show

Commit Message

Daniel Lezcano March 29, 2013, 10:31 a.m. UTC
The noop functions code is not necessary because the header file is
included in files which are compiled when CONFIG_CPU_IDLE is on.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/include/asm/cpuidle.h |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Santosh Shilimkar March 29, 2013, 11:40 a.m. UTC | #1
On Friday 29 March 2013 04:01 PM, Daniel Lezcano wrote:
> The noop functions code is not necessary because the header file is
> included in files which are compiled when CONFIG_CPU_IDLE is on.
> 
Well the inline function was to avoid buid breaks when
!CONFIG_CPU_IDLE.
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
Function without definition will break the build, No? Just
declaration isn't won't help to get the build through.

Ofcourse if all idle drivers are build *only when*
CONFIG_CPU_IDLE=y, then the patch is should
be fine.

Regards,
Santosh
Daniel Lezcano March 29, 2013, 11:53 a.m. UTC | #2
On 03/29/2013 12:40 PM, Santosh Shilimkar wrote:
> On Friday 29 March 2013 04:01 PM, Daniel Lezcano wrote:
>> The noop functions code is not necessary because the header file is
>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>
> Well the inline function was to avoid buid breaks when
> !CONFIG_CPU_IDLE.
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
> Function without definition will break the build, No? Just
> declaration isn't won't help to get the build through.
> 
> Ofcourse if all idle drivers are build *only when*
> CONFIG_CPU_IDLE=y, then the patch is should
> be fine.

Yes, it is case AFAICT.
diff mbox

Patch

diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
index 2fca60a..7367787 100644
--- a/arch/arm/include/asm/cpuidle.h
+++ b/arch/arm/include/asm/cpuidle.h
@@ -1,13 +1,8 @@ 
 #ifndef __ASM_ARM_CPUIDLE_H
 #define __ASM_ARM_CPUIDLE_H
 
-#ifdef CONFIG_CPU_IDLE
 extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
-		struct cpuidle_driver *drv, int index);
-#else
-static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
-		struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
+				    struct cpuidle_driver *drv, int index);
 
 /* Common ARM WFI state */
 #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\