git/list[1] front-page[2] threads[3] people[4] search[5] about
 

How do we review changes made with coccinelle?

From
Glen Choo <chooglen@google.com>
Date
Mar 30, 2023, 18:23 UTC
Message-ID
<kl6l7cuycd3n.fsf@chooglen-macbookpro.roam.corp.google.com>

Ævar recently sent a series that made pretty extensive use of coccinelle to remove a lot of the_repository [1], but then we ended up in this weird spot where even though several reviewers thought the code changes looked good, we weren't sure about giving Reviewed-By because we didn't know coccinelle or how to review it.

I'm pretty sure that the series could have been merged without a hitch if reviewers knew what to do about coccinelle. I expect more of these to appear as a result of the libification work, so it's probably a good time for us to figure out some norms about coccinelle :)

Perhaps we could start the discussion by sharing thoughts on the following questions, which I'll summarize in a change to contrib/coccinelle/README (where we can do final bikeshedding):

- Is it okay to give Reviewed-By on the basis of _just_ the in-tree
  changes and ignore the .cocci patch?
  - If not, what should reviewers look for in .cocci? Do we have a
    style?
- When do we introduce .pending.cocci vs .cocci?
- What do we do with .cocci after they've been applied?
- Do we care about new patches slowing down coccicheck?
Relevant threads
- How to learn cocci: https://lore.kernel.org/git/230326.86edpcw0yh.gmgdl@evledraar.gmail.com/ 
- https://lore.kernel.org/git/230328.86a5zxw31u.gmgdl@evledraar.gmail.com/
- https://lore.kernel.org/git/230326.86ileow1fu.gmgdl@evledraar.gmail.com/
[1] https://lore.kernel.org/git/cover-v2-00.17-00000000000-20230328T110946Z-avarab@gmail.com/
Next: Junio C Hamano
Message 1 of 6 in “How do we review changes made with coccinelle?”
  1. Glen ChooMar 30, 2023
  2. Junio C HamanoMar 30, 2023
  3. Glen ChooMar 31, 2023
  4. Junio C HamanoMar 31, 2023
  5. Taylor BlauMar 31, 2023
  6. Taylor BlauMar 31, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.