From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
linux-kernel@vger.kernel.org, Jani Nikula <jani.nikula@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v3 4/4] scripts/kernel-doc: some fixes to kernel-doc comments
Date: Tue, 13 Jan 2026 22:49:43 +0100 [thread overview]
Message-ID: <20260113224943.3e8b014c@foz.lan> (raw)
In-Reply-To: <87sec9w7ux.fsf@trenco.lwn.net>
Em Tue, 13 Jan 2026 13:55:18 -0700
Jonathan Corbet <corbet@lwn.net> escreveu:
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>
> > There are some typos and English errors at the kernel-doc.py comments.
> >
> > Locate them with the help of LLM (gpt-oss 14B), locally excecuted
> > with this prompt:
> >
> > review English grammar andsyntax at the comments on the code
> > below:
> > <cat scripts/kernel-doc.py>
> >
> > Not all results are flowers, although it caught several minor
> > issues there. Add the pertinent fixes, discarding the bad ones.
>
> "flowers"? Did the LLM put that out too? :)
No, you should blame me for the description ;-) I didn't ask LLM
to write it for me. On past experiments, LLM is not great writing
texts - specially with open models that run fine with 16GB VRAM.
I might have asked it to review(*).
I was trying to say that: while LLM worked fine for the task of
doing an English grammar review for the strings, being able to
distinguish them from the actual code, it was not is perfect:
some things required manual work to fix.
(*) asking it to review with this prompt:
"review the test below and produce a version with English spelling fixed:
<patch description>"
Gave:
"There are some typos and English errors in the comments of kernel‑doc.py.
Locate them with the help of an LLM (gpt‑oss 14B), executed locally with this prompt:
review English grammar and syntax at the comments on the code below:
<cat scripts/kernel-doc.py>
Not all results are perfect, although the LLM caught several minor issues.
Add the relevant fixes, discarding the incorrect ones."
Asking it to explain what changed with:
"what changes you did? why?" (**)
using ollama with gpt-oss:latest (14B) gave:
<llm_output>
Changes I made to the test text
-------------------------------
+---+---------------------+-----------------+--------------------------+
| # | Original phrase | Fixed phrase | Why it was changed |
+===+=====================+=================+==========================+
| 1 | ``excecuted`` | ``executed`` | Misspelling of |
| | | | *executed*. |
+---+---------------------+-----------------+--------------------------+
| 2 | ``synatx`` | ``syntax`` | Misspelling of *syntax*. |
+---+---------------------+-----------------+--------------------------+
| 3 | ``review English | ``review | Added a space between |
| | grammar andsyntax`` | English grammar | *grammar* and *syntax* |
| | | and syntax`` | and kept the |
| | | | capitalization |
| | | | consistent. |
+---+---------------------+-----------------+--------------------------+
| 4 | ``there.`` | ``there.`` (no | The original had an |
| | | change needed) | extraneous period after |
| | | | “there”. |
+---+---------------------+-----------------+--------------------------+
| 5 | ``Not all results | *Unchanged* | The phrase is |
| | are flowers`` | (this is a | intentional (“flowers” |
| | | playful phrase; | as a metaphor). |
| | | kept as‑is.) | |
+---+---------------------+-----------------+--------------------------+
| 6 | ``although it | ``although | No change—just added the |
| | caught several minor| it caught | missing period at the |
| | issues there.`` | several minor | end for completeness. |
| | | issues there.`` | |
+---+---------------------+-----------------+--------------------------+
| 7 | ``Add the pertinent | ``Add the | No spelling/grammar |
| | fixes, discard | pertinent fixes,| issue; kept for clarity. |
| | ing the bad ones.`` | discarding | |
| | | the bad ones.`` | |
+---+---------------------+-----------------+--------------------------+
Why these changes were made
---------------------------
- Spelling – The text contained a handful of typographical errors
(excecuted, synatx). Fixing them prevents confusion and gives
the reader confidence in the quality of the documentation.
- Punctuation – Adding a period after the final sentence makes the
paragraph a complete statement.
- Clarity – Adding a space between grammar and syntax keeps the
instruction legible.
- Professional tone – Corrected wording preserves the informal “flowers”
metaphor while ensuring that the rest of the instruction reads cleanly.
</llm_output>
Not a bad review.
Funny enough, on (5) it understood my metaphor, but it ended replacing
it to "Not all results are perfect", probably to give a "professional
tone".
(**) Yeah, that prompt is grammatically incorrect: I should have used
"did you do?" but, as I'm playing with LLM, I like to write prompts
with typos and other problems to see how well a 14B or less models
would get it right :-D
Sometimes I even change my language during prompts... it is funny
that sometimes it follows my lead and change the language as well,
while, on others, it keeps using the initial language... I even got
a case were it randomly switched to a completely different language.
> The changes themselves look fine.
Good! want me to send a new version to improve description?
Thanks,
Mauro
next prev parent reply other threads:[~2026-01-13 21:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 17:19 [PATCH v3 0/4] fix -Werror issues Mauro Carvalho Chehab
2026-01-13 17:19 ` [PATCH v3 1/4] scripts/kernel-doc: fix logic to handle unissued warnings Mauro Carvalho Chehab
2026-01-13 17:19 ` [PATCH v3 2/4] scripts/kernel-doc: avoid error_count overflows Mauro Carvalho Chehab
2026-01-14 6:42 ` Randy Dunlap
2026-01-13 17:19 ` [PATCH v3 3/4] scripts/kernel-doc: ensure that comments are using our coding style Mauro Carvalho Chehab
2026-01-13 17:19 ` [PATCH v3 4/4] scripts/kernel-doc: some fixes to kernel-doc comments Mauro Carvalho Chehab
2026-01-13 20:55 ` Jonathan Corbet
2026-01-13 21:49 ` Mauro Carvalho Chehab [this message]
2026-01-13 22:10 ` Mauro Carvalho Chehab
2026-01-13 22:48 ` OOT: some LLM-generated humor over a patch description - Was: " Mauro Carvalho Chehab
2026-01-13 23:54 ` Jonathan Corbet
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=20260113224943.3e8b014c@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=jani.nikula@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=skhan@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox