ACK: [PATCH] cpu: cpufreq: make small one-line helper functions inline
ivanhu
ivan.hu at canonical.com
Tue May 23 06:50:05 UTC 2017
On 05/10/2017 05:27 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> We may as way hint to the compiler that the tiny one-line helper
> functions cpu_set_lowest_frequency and cpu_set_highest_frequency
> can be inlined. They probably are already, but hinting it may be
> useful.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/cpu/cpufreq/cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 1cfac3aa..630d0cdf 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -136,12 +136,12 @@ out:
> return rc;
> }
>
> -static int cpu_set_lowest_frequency(fwts_framework *fw, struct cpu *cpu)
> +static inline int cpu_set_lowest_frequency(fwts_framework *fw, struct cpu *cpu)
> {
> return cpu_set_frequency(fw, cpu, cpu->freqs[0].Hz);
> }
>
> -static int cpu_set_highest_frequency(fwts_framework *fw, struct cpu *cpu)
> +static inline int cpu_set_highest_frequency(fwts_framework *fw, struct cpu *cpu)
> {
> return cpu_set_frequency(fw, cpu, cpu->freqs[cpu->n_freqs-1].Hz);
> }
Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20170523/2cae7d7d/attachment.html>
More information about the fwts-devel
mailing list