On Mon, 24 Aug 2020, 2:42pm, Alex Dewar wrote:
>
> On 2020-08-20 19:51, Alex Dewar wrote:
> > In qla25xx_set_els_cmds_supported(), a call is made to
> > dma_alloc_coherent() followed by zeroing the memory with memset. This is
> > unnecessary as dma_alloc_coherent() already zeros memory. Remove.
>
On 2020-08-20 19:51, Alex Dewar wrote:
In qla25xx_set_els_cmds_supported(), a call is made to
dma_alloc_coherent() followed by zeroing the memory with memset. This is
unnecessary as dma_alloc_coherent() already zeros memory. Remove.
Issue identified with Coccinelle.
Signed-off-by: Alex Dewar
In qla25xx_set_els_cmds_supported(), a call is made to
dma_alloc_coherent() followed by zeroing the memory with memset. This is
unnecessary as dma_alloc_coherent() already zeros memory. Remove.
Issue identified with Coccinelle.
Signed-off-by: Alex Dewar
---
drivers/scsi/qla2xxx/qla_mbx.c | 2 --
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.
Semantic patch used to resolve this issue:
@@
expression e,e2; constant c;
statement S;
@@
e = kzalloc(e2, c);
if(e == NULL) S
- memset(e, 0,
4 matches
Mail list logo