scripts/coccinelle: add some more coccinelle testskmerr: verify that malloc and calloc are followed by a check to verifythat we are not out of memory.badzero: Compare pointer-typed values to NUL
scripts/coccinelle: add some more coccinelle testskmerr: verify that malloc and calloc are followed by a check to verifythat we are not out of memory.badzero: Compare pointer-typed values to NULL rather than 0Both checks are copied from the Linux kernel archive.Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
show more ...
scripts/coccinelle: add some more coccinelle testsAdd some useful static code analysis scripts for coccinellecopied from the Linux kernel v4.14-rc8:Warn on check against NULL before calling free
scripts/coccinelle: add some more coccinelle testsAdd some useful static code analysis scripts for coccinellecopied from the Linux kernel v4.14-rc8:Warn on check against NULL before calling free.scripts/coccinelle/free/ifnullfree.cocciDetect superfluous NULL check for list iterator.scripts/coccinelle/iterators/itnull.cocciCheck if list iterator is reassigned.scripts/coccinelle/iterators/list_entry_update.cocciCheck if list iterator is used after loop.scripts/coccinelle/iterators/use_after_iter.cocciFind wrong argument of sizeof in allocation function:scripts/coccinelle/misc/badty.cocciSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
scripts: Add a cocci patch for miiphy_registerMany Ethernet drivers still use the legacy miiphy API to register theirmdio interface for access to the mdio commands.This semantic patch will conve
scripts: Add a cocci patch for miiphy_registerMany Ethernet drivers still use the legacy miiphy API to register theirmdio interface for access to the mdio commands.This semantic patch will convert the drivers from the legacy adapter APIto the more modern alloc/register API.Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>