linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Lina Iyer <ilina@codeaurora.org>
Subject: Re: [PATCH 1/5] cpuidle: Remove pointless stub
Date: Fri, 16 Oct 2020 17:24:07 +0200	[thread overview]
Message-ID: <CAJZ5v0gPYXhqP4CF+ep3tE7ov5zza0FW9_9cuDsiqznUX8CTCQ@mail.gmail.com> (raw)
In-Reply-To: <20201015144431.9979-1-daniel.lezcano@linaro.org>

On Thu, Oct 15, 2020 at 4:44 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> 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,                                    \
> --

Applied (this patch alone) as 5.10-rc material with some minor edits
in the changelog, thanks!

  parent reply	other threads:[~2020-10-16 15:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Rafael J. Wysocki [this message]
2020-10-16 20:31   ` [PATCH 1/5] cpuidle: Remove pointless stub Daniel Lezcano
2020-11-05 14:14     ` Rafael J. Wysocki
2020-11-05 15:31       ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJZ5v0gPYXhqP4CF+ep3tE7ov5zza0FW9_9cuDsiqznUX8CTCQ@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=ilina@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).