u-boot/scripts/coccinelle
Heinrich Schuchardt cb2a2ebd4f coccinelle: check for casting malloc output
Casting the (void *) output of memory allocation functions before
assignment like in

	sata->cmd_hdr_tbl_offset = (void *)malloc(length + align);

is useless.

Adopt the Linux kernel script
scripts/coccinelle/api/alloc/alloc_cast.cocci.

Now 'make coccicheck' generates warnings like:

./drivers/ata/fsl_sata.c:143:29-33:
WARNING: casting value returned by memory allocation function
to (void *) is useless.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-04-24 16:40:09 -04:00
..
api/alloc coccinelle: check for casting malloc output 2020-04-24 16:40:09 -04:00
free scripts/coccinelle: add some more coccinelle tests 2017-11-20 20:18:39 -05:00
iterators scripts/coccinelle: add some more coccinelle tests 2017-11-20 20:18:39 -05:00
misc scripts/coccinelle: add some more coccinelle tests 2017-11-20 20:18:39 -05:00
net
null scripts/coccinelle: add some more coccinelle tests 2018-03-09 12:31:07 -05:00