From: Patrick Little <plittle@gmail.com>
To: Joseph Kogut <joseph.kogut@gmail.com>,
Lukasz Luba <lukasz.luba@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Patrick Little <plittle@gmail.com>
Subject: [PATCH 2/2] Documentation: Fix bug in example code snippet
Date: Wed, 28 Jan 2026 16:33:12 -0600 [thread overview]
Message-ID: <20260128-documentation-fix-grammar-v1-2-39238dc471f9@gmail.com> (raw)
In-Reply-To: <20260128-documentation-fix-grammar-v1-0-39238dc471f9@gmail.com>
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
next prev parent reply other threads:[~2026-01-28 22:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Patrick Little [this message]
2026-01-29 1:08 ` [PATCH 2/2] Documentation: Fix bug in example code snippet Randy Dunlap
2026-01-30 19:25 ` [PATCH 0/2] Fix grammar and example code in Documentation Rafael J. Wysocki
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=20260128-documentation-fix-grammar-v1-2-39238dc471f9@gmail.com \
--to=plittle@gmail.com \
--cc=corbet@lwn.net \
--cc=joseph.kogut@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.