On Sun, Apr 19, 2020 at 11:07:34AM +0200, Heinrich Schuchardt wrote:

> 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 <[email protected]>

Applied to u-boot/master, thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to