linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] cpuidle: Remove pointless stub
@ 2020-10-15 14:44 Daniel Lezcano
  2020-10-15 14:44 ` [PATCH 2/5] cpuidle: governor: Encapsulate the cpuidle on/off switch Daniel Lezcano
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Daniel Lezcano @ 2020-10-15 14:44 UTC (permalink / raw)
  To: daniel.lezcano, rjw; +Cc: linux-kernel, linux-pm, ilina

The cpuidle.h header is declaring functions with an empty stub when
cpuidle is not enabled. However these functions are only called from
the governors which depends on cpuidle. In other words, when the
function is called it is when cpuidle is enabled, there is no
situation when it is called with cpuidle disabled.

Remove the pointless stub.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/linux/cpuidle.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 6175c77bf25e..74fdcc6106b1 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -270,13 +270,8 @@ struct cpuidle_governor {
 	void (*reflect)		(struct cpuidle_device *dev, int index);
 };
 
-#ifdef CONFIG_CPU_IDLE
 extern int cpuidle_register_governor(struct cpuidle_governor *gov);
 extern s64 cpuidle_governor_latency_req(unsigned int cpu);
-#else
-static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
-{return 0;}
-#endif
 
 #define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter,			\
 				idx,					\
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-09 12:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 14:44 [PATCH 1/5] cpuidle: Remove pointless stub Daniel Lezcano
2020-10-15 14:44 ` [PATCH 2/5] cpuidle: governor: Encapsulate the cpuidle on/off switch Daniel Lezcano
2020-10-15 14:44 ` [PATCH 3/5] cpuidle: governor: Make possible to unregister a governor Daniel Lezcano
2020-10-15 14:44 ` [PATCH 4/5] cpuidle: governor: Export the needed symbols Daniel Lezcano
2020-11-05 14:04   ` Rafael J. Wysocki
2020-11-09 12:34     ` Peter Zijlstra
2020-10-15 14:44 ` [PATCH 5/5] cpuidle: governor: Convert governors to modules Daniel Lezcano
2020-10-16 15:24 ` [PATCH 1/5] cpuidle: Remove pointless stub Rafael J. Wysocki
2020-10-16 20:31   ` Daniel Lezcano
2020-11-05 14:14     ` Rafael J. Wysocki
2020-11-05 15:31       ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).