Re: [PATCH] scsi: qla2xxx: Remove unnecessary call to memset

2020-08-26 Thread Arun Easi
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. >

Re: [PATCH] scsi: qla2xxx: Remove unnecessary call to memset

2020-08-24 Thread Alex Dewar
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

[PATCH] scsi: qla2xxx: Remove unnecessary call to memset

2020-08-20 Thread 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 --

[PATCH] scsi: qla2xxx: remove unnecessary call to memset

2017-09-11 Thread Himanshu Jha
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,