Discussion:
[Cocci] uses of Coccinelle
Julia Lawall
2018-10-07 06:02:27 UTC
Permalink
Hello,

It would be helpful to me to have a list of some things that Coccinelle
has recently been used for. A one sentence description, would be quite
sufficient.

thanks,
julia
SF Markus Elfring
2018-10-08 10:35:34 UTC
Permalink
Post by Julia Lawall
It would be helpful to me to have a list of some things that Coccinelle
has recently been used for.
Are you looking for use cases and corresponding software applications
which have not been discussed on this mailing list before?

Did you try any internet searches out for development topics like
bAdjustments achieved together with the semantic patch languageb?

Regards,
Markus
Julia Lawall
2018-10-08 10:50:32 UTC
Permalink
Post by SF Markus Elfring
Post by Julia Lawall
It would be helpful to me to have a list of some things that Coccinelle
has recently been used for.
Are you looking for use cases and corresponding software applications
which have not been discussed on this mailing list before?
Anything is fine.
Post by SF Markus Elfring
Did you try any internet searches out for development topics like
b?Adjustments achieved together with the semantic patch languageb??
It's not really obvious what to search for, and such a comment might not
be associated with a use of Coccinelle anyway.

julia
Julia Lawall
2018-10-08 11:39:29 UTC
Permalink
Post by Julia Lawall
Anything is fine.
How do you think about to reconsider any change possibilities
which were registered in issue trackers or patchwork instances?
I'm not interested in specific changes, but rather in more general
applications.

julia
Post by Julia Lawall
It's not really obvious what to search for, and such a comment might not
be associated with a use of Coccinelle anyway.
Can any hits appear for SmPL scripts in areas which have not been
so popular that their transformation results were presented
on development conferences?
Regards,
Markus
Gustavo A. R. Silva
2018-10-08 11:21:14 UTC
Permalink
Hi Julia,
Post by Julia Lawall
Hello,
It would be helpful to me to have a list of some things that Coccinelle
has recently been used for. A one sentence description, would be quite
sufficient.
I have used Coccinelle for the following list of things:

- Fix duplicate code
- Add NULL checks on function return values (like devm_kzalloc() and devm_kmemdup())
- Fix error return codes
- Fix NULL pointer dereferences
- Replace open-code with the swap macro
- Constification
- Use true and false for boolean values
- Remove unnecessary NULL checks
- Replace open-code with the PTR_ERR_OR_ZERO macro
- Replace PTR_RET with PTR_ERR_OR_ZERO
- Fix inconsistent IS_ERR and PTR_ERR
- Fix uninitialized variables
- Replace open-code with the ARRAY_SIZE macro
- Fix application of sizeof to pointer
- Fix incorrect bit mask
- Use BUG_ON instead of if condition followed by BUG
- Compress return logic into one line
- Remove unnecessary cast on kmalloc
- Identify potential integer overflows during memory allocation

Thanks
--
Gustavo
Michael Stefaniuc
2018-10-08 19:02:58 UTC
Permalink
Hello Julia,
Post by Julia Lawall
It would be helpful to me to have a list of some things that Coccinelle
has recently been used for. A one sentence description, would be quite
sufficient.
I'm using coccinelle exclusively on Wine.
Not doing anything fancy now, just replacing open coded ARRAY_SIZE() (as
that is a late addition to Wine there are quite a lot of those.
Here and then I rerun some of my older scripts, basically janitorial work.

If you're interested in stuff from the past:
- COM cleanup (coccinelle script generating coccinelle scripts, one per
COM interface).
- Open coded *Rect*() function for the Win32 RECT type.


bye
michael
Julia Lawall
2018-10-08 20:20:34 UTC
Permalink
Post by Michael Stefaniuc
Hello Julia,
Post by Julia Lawall
It would be helpful to me to have a list of some things that Coccinelle
has recently been used for. A one sentence description, would be quite
sufficient.
I'm using coccinelle exclusively on Wine.
Not doing anything fancy now, just replacing open coded ARRAY_SIZE() (as
that is a late addition to Wine there are quite a lot of those.
Here and then I rerun some of my older scripts, basically janitorial work.
- COM cleanup (coccinelle script generating coccinelle scripts, one per
COM interface).
- Open coded *Rect*() function for the Win32 RECT type.
Thanks, that is sufficient information. Thanks for your help.

julia

Loading...