mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix grammar and example code in Documentation.
@ 2026-01-28 22:33 Patrick Little
  2026-01-28 22:33 ` [PATCH 1/2] Documentation: Fix typos Patrick Little
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Patrick Little @ 2026-01-28 22:33 UTC (permalink / raw)
  To: Joseph Kogut, Lukasz Luba, Rafael J. Wysocki, Len Brown,
	Pavel Machek, Jonathan Corbet
  Cc: linux-pm, linux-kernel, linux-doc, Patrick Little

I split these into:
  Text updates
  Example code updates

If it would be better split more or differently, I'm happy to do that.
These are strictly typo fixes, no clarification or rewording.

---
Patrick Little (2):
      Documentation: Fix typos
      Documentation: Fix bug in example code snippet

 Documentation/power/energy-model.rst     | 18 +++++++++---------
 Documentation/scheduler/sched-energy.rst |  8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)
---
base-commit: 63804fed149a6750ffd28610c5c1c98cce6bd377
change-id: 20260128-documentation-fix-grammar-3f285af10f5d

Best regards,
-- 
Patrick Little <plittle@gmail.com>


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

* [PATCH 1/2] Documentation: Fix typos
  2026-01-28 22:33 [PATCH 0/2] Fix grammar and example code in Documentation Patrick Little
@ 2026-01-28 22:33 ` Patrick Little
  2026-01-29  1:08   ` Randy Dunlap
  2026-01-28 22:33 ` [PATCH 2/2] Documentation: Fix bug in example code snippet Patrick Little
  2026-01-30 19:25 ` [PATCH 0/2] Fix grammar and example code in Documentation Rafael J. Wysocki
  2 siblings, 1 reply; 6+ messages in thread
From: Patrick Little @ 2026-01-28 22:33 UTC (permalink / raw)
  To: Joseph Kogut, Lukasz Luba, Rafael J. Wysocki, Len Brown,
	Pavel Machek, Jonathan Corbet
  Cc: linux-pm, linux-kernel, linux-doc, Patrick Little

Fix typos in Documentation.

Signed-off-by: Patrick Little <plittle@gmail.com>
---
 Documentation/power/energy-model.rst     | 14 +++++++-------
 Documentation/scheduler/sched-energy.rst |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/power/energy-model.rst b/Documentation/power/energy-model.rst
index cbdf7520aaa6..65133187f2ad 100644
--- a/Documentation/power/energy-model.rst
+++ b/Documentation/power/energy-model.rst
@@ -14,8 +14,8 @@ subsystems willing to use that information to make energy-aware decisions.
 The source of the information about the power consumed by devices can vary greatly
 from one platform to another. These power costs can be estimated using
 devicetree data in some cases. In others, the firmware will know better.
-Alternatively, userspace might be best positioned. And so on. In order to avoid
-each and every client subsystem to re-implement support for each and every
+Alternatively, userspace might be best positioned. In order to avoid
+having each and every client subsystem re-implement support for each and every
 possible source of information on its own, the EM framework intervenes as an
 abstraction layer which standardizes the format of power cost tables in the
 kernel, hence enabling to avoid redundant work.
@@ -32,7 +32,7 @@ be found in the Intelligent Power Allocation in
 Documentation/driver-api/thermal/power_allocator.rst.
 Kernel subsystems might implement automatic detection to check whether EM
 registered devices have inconsistent scale (based on EM internal flag).
-Important thing to keep in mind is that when the power values are expressed in
+An important thing to keep in mind is that when the power values are expressed in
 an 'abstract scale' deriving real energy in micro-Joules would not be possible.
 
 The figure below depicts an example of drivers (Arm-specific here, but the
@@ -82,7 +82,7 @@ using kref mechanism. The device driver which provided the new EM at runtime,
 should call EM API to free it safely when it's no longer needed. The EM
 framework will handle the clean-up when it's possible.
 
-The kernel code which want to modify the EM values is protected from concurrent
+The kernel code which wants to modify the EM values is protected from concurrent
 access using a mutex. Therefore, the device driver code must run in sleeping
 context when it tries to modify the EM.
 
@@ -113,7 +113,7 @@ Registration of 'advanced' EM
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The 'advanced' EM gets its name due to the fact that the driver is allowed
-to provide more precised power model. It's not limited to some implemented math
+to provide a more precise power model. It's not limited to some implemented math
 formula in the framework (like it is in 'simple' EM case). It can better reflect
 the real power measurements performed for each performance state. Thus, this
 registration method should be preferred in case considering EM static power
@@ -172,7 +172,7 @@ Registration of 'simple' EM
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The 'simple' EM is registered using the framework helper function
-cpufreq_register_em_with_opp(). It implements a power model which is tight to
+cpufreq_register_em_with_opp(). It implements a power model which is tied to a
 math formula::
 
 	Power = C * V^2 * f
@@ -251,7 +251,7 @@ It returns the 'struct em_perf_state' pointer which is an array of performance
 states in ascending order.
 This function must be called in the RCU read lock section (after the
 rcu_read_lock()). When the EM table is not needed anymore there is a need to
-call rcu_real_unlock(). In this way the EM safely uses the RCU read section
+call rcu_read_unlock(). In this way the EM safely uses the RCU read section
 and protects the users. It also allows the EM framework to manage the memory
 and free it. More details how to use it can be found in Section 3.2 in the
 example driver.
diff --git a/Documentation/scheduler/sched-energy.rst b/Documentation/scheduler/sched-energy.rst
index 70e2921ef725..4e47aaf103eb 100644
--- a/Documentation/scheduler/sched-energy.rst
+++ b/Documentation/scheduler/sched-energy.rst
@@ -244,7 +244,7 @@ Example 2.
 
 
     From these calculations, the Case 1 has the lowest total energy. So CPU 1
-    is be the best candidate from an energy-efficiency standpoint.
+    is the best candidate from an energy-efficiency standpoint.
 
 Big CPUs are generally more power hungry than the little ones and are thus used
 mainly when a task doesn't fit the littles. However, little CPUs aren't always
@@ -252,7 +252,7 @@ necessarily more energy-efficient than big CPUs. For some systems, the high OPPs
 of the little CPUs can be less energy-efficient than the lowest OPPs of the
 bigs, for example. So, if the little CPUs happen to have enough utilization at
 a specific point in time, a small task waking up at that moment could be better
-of executing on the big side in order to save energy, even though it would fit
+off executing on the big side in order to save energy, even though it would fit
 on the little side.
 
 And even in the case where all OPPs of the big CPUs are less energy-efficient
@@ -285,7 +285,7 @@ much that can be done by the scheduler to save energy without severely harming
 throughput. In order to avoid hurting performance with EAS, CPUs are flagged as
 'over-utilized' as soon as they are used at more than 80% of their compute
 capacity. As long as no CPUs are over-utilized in a root domain, load balancing
-is disabled and EAS overridess the wake-up balancing code. EAS is likely to load
+is disabled and EAS overrides the wake-up balancing code. EAS is likely to load
 the most energy efficient CPUs of the system more than the others if that can be
 done without harming throughput. So, the load-balancer is disabled to prevent
 it from breaking the energy-efficient task placement found by EAS. It is safe to
@@ -385,7 +385,7 @@ Using EAS with any other governor than schedutil is not supported.
 6.5 Scale-invariant utilization signals
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-In order to make accurate prediction across CPUs and for all performance
+In order to make accurate predictions across CPUs and for all performance
 states, EAS needs frequency-invariant and CPU-invariant PELT signals. These can
 be obtained using the architecture-defined arch_scale{cpu,freq}_capacity()
 callbacks.

-- 
2.51.0


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

* [PATCH 2/2] Documentation: Fix bug in example code snippet
  2026-01-28 22:33 [PATCH 0/2] Fix grammar and example code in Documentation Patrick Little
  2026-01-28 22:33 ` [PATCH 1/2] Documentation: Fix typos Patrick Little
@ 2026-01-28 22:33 ` Patrick Little
  2026-01-29  1:08   ` Randy Dunlap
  2026-01-30 19:25 ` [PATCH 0/2] Fix grammar and example code in Documentation Rafael J. Wysocki
  2 siblings, 1 reply; 6+ messages in thread
From: Patrick Little @ 2026-01-28 22:33 UTC (permalink / raw)
  To: Joseph Kogut, Lukasz Luba, Rafael J. Wysocki, Len Brown,
	Pavel Machek, Jonathan Corbet
  Cc: linux-pm, linux-kernel, linux-doc, Patrick Little

A semicolon was mistakenly placed at the end of 'if' statements.
If example is copied as-is, it would lead to the subsequent return
being executed unconditionally, which is incorrect, and the rest of the
function would never be reached.

Signed-off-by: Patrick Little <plittle@gmail.com>
---
 Documentation/power/energy-model.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/power/energy-model.rst b/Documentation/power/energy-model.rst
index 65133187f2ad..0d4644d72767 100644
--- a/Documentation/power/energy-model.rst
+++ b/Documentation/power/energy-model.rst
@@ -308,12 +308,12 @@ EM framework::
   05
   06		/* Use the 'foo' protocol to ceil the frequency */
   07		freq = foo_get_freq_ceil(dev, *KHz);
-  08		if (freq < 0);
+  08		if (freq < 0)
   09			return freq;
   10
   11		/* Estimate the power cost for the dev at the relevant freq. */
   12		power = foo_estimate_power(dev, freq);
-  13		if (power < 0);
+  13		if (power < 0)
   14			return power;
   15
   16		/* Return the values to the EM framework */

-- 
2.51.0


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

* Re: [PATCH 1/2] Documentation: Fix typos
  2026-01-28 22:33 ` [PATCH 1/2] Documentation: Fix typos Patrick Little
@ 2026-01-29  1:08   ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2026-01-29  1:08 UTC (permalink / raw)
  To: Patrick Little, Joseph Kogut, Lukasz Luba, Rafael J. Wysocki,
	Len Brown, Pavel Machek, Jonathan Corbet
  Cc: linux-pm, linux-kernel, linux-doc



On 1/28/26 2:33 PM, Patrick Little wrote:
> Fix typos in Documentation.
> 
> Signed-off-by: Patrick Little <plittle@gmail.com>


Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.
> ---
>  Documentation/power/energy-model.rst     | 14 +++++++-------
>  Documentation/scheduler/sched-energy.rst |  8 ++++----
>  2 files changed, 11 insertions(+), 11 deletions(-)
> 

-- 
~Randy

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

* Re: [PATCH 2/2] Documentation: Fix bug in example code snippet
  2026-01-28 22:33 ` [PATCH 2/2] Documentation: Fix bug in example code snippet Patrick Little
@ 2026-01-29  1:08   ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2026-01-29  1:08 UTC (permalink / raw)
  To: Patrick Little, Joseph Kogut, Lukasz Luba, Rafael J. Wysocki,
	Len Brown, Pavel Machek, Jonathan Corbet
  Cc: linux-pm, linux-kernel, linux-doc



On 1/28/26 2:33 PM, Patrick Little wrote:
> A semicolon was mistakenly placed at the end of 'if' statements.
> If example is copied as-is, it would lead to the subsequent return
> being executed unconditionally, which is incorrect, and the rest of the
> function would never be reached.
> 
> Signed-off-by: Patrick Little <plittle@gmail.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  Documentation/power/energy-model.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/power/energy-model.rst b/Documentation/power/energy-model.rst
> index 65133187f2ad..0d4644d72767 100644
> --- a/Documentation/power/energy-model.rst
> +++ b/Documentation/power/energy-model.rst
> @@ -308,12 +308,12 @@ EM framework::
>    05
>    06		/* Use the 'foo' protocol to ceil the frequency */
>    07		freq = foo_get_freq_ceil(dev, *KHz);
> -  08		if (freq < 0);
> +  08		if (freq < 0)
>    09			return freq;
>    10
>    11		/* Estimate the power cost for the dev at the relevant freq. */
>    12		power = foo_estimate_power(dev, freq);
> -  13		if (power < 0);
> +  13		if (power < 0)
>    14			return power;
>    15
>    16		/* Return the values to the EM framework */
> 

-- 
~Randy

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

* Re: [PATCH 0/2] Fix grammar and example code in Documentation.
  2026-01-28 22:33 [PATCH 0/2] Fix grammar and example code in Documentation Patrick Little
  2026-01-28 22:33 ` [PATCH 1/2] Documentation: Fix typos Patrick Little
  2026-01-28 22:33 ` [PATCH 2/2] Documentation: Fix bug in example code snippet Patrick Little
@ 2026-01-30 19:25 ` Rafael J. Wysocki
  2 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2026-01-30 19:25 UTC (permalink / raw)
  To: Patrick Little
  Cc: Joseph Kogut, Lukasz Luba, Rafael J. Wysocki, Len Brown,
	Pavel Machek, Jonathan Corbet, linux-pm, linux-kernel, linux-doc

On Wed, Jan 28, 2026 at 11:33 PM Patrick Little <plittle@gmail.com> wrote:
>
> I split these into:
>   Text updates
>   Example code updates
>
> If it would be better split more or differently, I'm happy to do that.
> These are strictly typo fixes, no clarification or rewording.
>
> ---
> Patrick Little (2):
>       Documentation: Fix typos
>       Documentation: Fix bug in example code snippet
>
>  Documentation/power/energy-model.rst     | 18 +++++++++---------
>  Documentation/scheduler/sched-energy.rst |  8 ++++----
>  2 files changed, 13 insertions(+), 13 deletions(-)
> ---

Both patches applied as 6.20/7.0 material under adjusted changelogs
(to indicate that they are related to energy model management).

Thanks!

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

end of thread, other threads:[~2026-01-30 19:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-28 22:33 [PATCH 0/2] Fix grammar and example code in Documentation Patrick Little
2026-01-28 22:33 ` [PATCH 1/2] Documentation: Fix typos Patrick Little
2026-01-29  1:08   ` Randy Dunlap
2026-01-28 22:33 ` [PATCH 2/2] Documentation: Fix bug in example code snippet Patrick Little
2026-01-29  1:08   ` Randy Dunlap
2026-01-30 19:25 ` [PATCH 0/2] Fix grammar and example code in Documentation Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®