Re: [cocci] Adjustments for first statements from selected function implementations?
Julia Lawall <[email protected]> Wed, 25 Mar 2026 08:30:10 +0100 (CET)
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 25 Mar 2026, Markus Elfring wrote: > Hello! > > A contribution like the following shows how a statement can occasionally be added > to the beginning of a function implementation. > > PM: runtime: Mark last busy stamp in pm_request_autosuspend() > 2025-06-18 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18c1fe53d186867243f4cf17f4eef60737a16c4c > > Such an adjustment triggers further opportunities for corresponding collateral evolution. > The semantic patch language can help in the determination to some degree > if the mentioned statement is still specified before a call of the known function > at other source code places. > A desire can evolve then to omit repeated statements before more selected function calls. > > Usual case distinctions trigger further development challenges. > > * How would you prefer to manage function names (for SmPL scripts)? > > * Several inline function implementations are also stored in header files. > Some header files tend to provide contents which are not really supported > by the Coccinelle software so far. > > > Would you be looking then for further possibilities with improving affected > data processing? I looked at the link, but I really have no idea what any of this means. As long as inline functions are parseable, it doesn't matter about the other contents of header files. julia