diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-04-19 11:07:34 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-24 16:40:09 -0400 |
commit | cb2a2ebd4f93220936de721918ed9a3ca57cc5db (patch) | |
tree | abe4255ab3c9f52cb753a79ff9dcea995887446a /arch/arm/Kconfig | |
parent | b5a2046376e7f18f796f641a51fdc66a5a52306a (diff) | |
download | u-boot-cb2a2ebd4f93220936de721918ed9a3ca57cc5db.tar.gz |
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>
Diffstat (limited to 'arch/arm/Kconfig')
0 files changed, 0 insertions, 0 deletions