Hi Julia,
Post by Julia LawallHello,
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