[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1c0b6a0f-abf6-43b9-84c9-5911087f23c4@infradead.org>
Date: Wed, 28 Jan 2026 17:08:08 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Patrick Little <plittle@...il.com>, Joseph Kogut
<joseph.kogut@...il.com>, Lukasz Luba <lukasz.luba@....com>,
"Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
Pavel Machek <pavel@...nel.org>, Jonathan Corbet <corbet@....net>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/2] Documentation: Fix bug in example code snippet
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@...il.com>
Acked-by: Randy Dunlap <rdunlap@...radead.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
Powered by blists - more mailing lists