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

Re: coccinelle: merge two rules from flex_alloc.cocci

From
MEMarkus Elfring <markus.elfring@web.de>
Date
Nov 13, 2019, 21:10 UTC
Message-ID
<ff240bc1-ae2a-17e5-d149-2d08c5367e96@web.de>
In-Reply-To
<CAN0heSodNonkDK8AT9iJqmWLLCdO0OoHho0ijZOAmri5ren2dw@mail.gmail.com>
Show 6 quoted lines
>>> This script contained two transformation rules for the semantic patch language
>>> which used duplicate code.
>>> Thus combine these rules by using a SmPL disjunction for the replacement
>>> of two identifiers.
>
> My knowledge of coccinelle and cocci rules is basically zero,
Would you like to change this situation eventually?
> but my impression from this list is that running "make coccicheck"
> can be expensive, both in terms of time and memory.

The desired source code analysis to detect possible software transformations needs additional data processing resources. It is usually hoped that corresponding efforts will help with development approaches at other places.

> Do these patches help there in any way?
I hope so to some degree.
How much do you care to avoid code duplication?
> Or could they hurt?

I assume that you ask according to the presented change possibilities for Git's SmPL scripts (and not only for “flex_alloc.cocci”).

Some changes usually contain the risk for undesirable effects. Would you like to clarify each of them in more detail?

Regards, Markus

Previous: Martin ÅgrenNext: Martin Ågren
Message 4 of 9 in “coccinelle: merge two rules from flex_alloc.cocci”
  1. coccinelle: merge two rules from flex_alloc.cocciMarkus Elfring, Nov 12, 2019
  2. Denton LiuNov 12, 2019
  3. Martin ÅgrenNov 13, 2019
  4. Markus ElfringNov 13, 2019
  5. Martin ÅgrenNov 14, 2019
  6. Markus ElfringNov 14, 2019
  7. SZEDER GáborNov 14, 2019
  8. Markus ElfringNov 14, 2019
  9. Junio C HamanoNov 15, 2019

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.