Re: [Cocci] Converting a function return type to void based on a SmPL constraint?

2019-10-16 Thread Markus Elfring
>> I got the software development idea then to change the function return type >> to “void” together with the deletion of return statements by the help of >> the tool “Coccinelle 1.0.8-4-g842075f7” instead of adjusting return >> values. >> >> @replacement@ >> constant C; >> identifier action,

Re: [Cocci] Converting a function return type to void based on a SmPL constraint?

2019-10-15 Thread Markus Elfring
> Unfortunately, I do not get the transformation result which I would expect > for this approach. But I have noticed also that a similar SmPL script > can work as expected (if a function like “unpin_extent_cache” was not marked > as “static”?). The following SmPL script variant does also not work

[Cocci] Converting a function return type to void based on a SmPL constraint?

2019-10-15 Thread Markus Elfring
Hello, I have noticed that an update suggestion can be provided for a source file by a known script for the semantic patch language. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/misc/returnvar.cocci?id=8e0d0ad206f08506c893326ca7c9c3d9cc042cef Update

[Cocci] Converting a function return type to void based on a SmPL constraint?

2019-10-15 Thread Markus Elfring
Hello, I have noticed that an update suggestion can be provided for a source file by a known script for the semantic patch language. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/misc/returnvar.cocci?id=8e0d0ad206f08506c893326ca7c9c3d9cc042cef Update