Skip to content

Commit

Permalink
Merge back cpufreq material for v5.14.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael J. Wysocki committed Jun 21, 2021
2 parents 771fac5 + bcc936c commit 6cbab78
Show file tree
Hide file tree
Showing 6 changed files with 243 additions and 34 deletions.
6 changes: 6 additions & 0 deletions Documentation/admin-guide/pm/intel_pstate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ argument is passed to the kernel in the command line.
inclusive) including both turbo and non-turbo P-states (see
`Turbo P-states Support`_).

This attribute is present only if the value exposed by it is the same
for all of the CPUs in the system.

The value of this attribute is not affected by the ``no_turbo``
setting described `below <no_turbo_attr_>`_.

Expand All @@ -374,6 +377,9 @@ argument is passed to the kernel in the command line.
Ratio of the `turbo range <turbo_>`_ size to the size of the entire
range of supported P-states, in percent.

This attribute is present only if the value exposed by it is the same
for all of the CPUs in the system.

This attribute is read-only.

.. _no_turbo_attr:
Expand Down
5 changes: 2 additions & 3 deletions drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void cpufreq_stats_free_table(struct cpufreq_policy *policy)

void cpufreq_stats_create_table(struct cpufreq_policy *policy)
{
unsigned int i = 0, count = 0, ret = -ENOMEM;
unsigned int i = 0, count;
struct cpufreq_stats *stats;
unsigned int alloc_size;
struct cpufreq_frequency_table *pos;
Expand Down Expand Up @@ -253,8 +253,7 @@ void cpufreq_stats_create_table(struct cpufreq_policy *policy)
stats->last_index = freq_table_get_index(stats, policy->cur);

policy->stats = stats;
ret = sysfs_create_group(&policy->kobj, &stats_attr_group);
if (!ret)
if (!sysfs_create_group(&policy->kobj, &stats_attr_group))
return;

/* We failed, release resources */
Expand Down
Loading

0 comments on commit 6cbab78

Please sign in to comment.