[PATCH] scsi: megaraid: Use zeroing memory allocator than allocator/memset

2017-12-30 Thread Himanshu Jha
Use pci_zalloc_consistent for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha

[PATCH] scsi: fnic: Use eth_broadcast_addr instead of memset

2017-12-30 Thread Himanshu Jha
Use eth_broadcasr_addr Networking API instead of memset to assign the broadcast address to the given address array. 0-day tested with no failures. Signed-off-by: Himanshu Jha --- drivers/scsi/fnic/fnic_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 4/9] scsi: mvsas: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/mvsas/mv_init.c | 27

[PATCH 5/9] scsi: fnic: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use vzalloc instead of vmalloc followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/fnic/fnic_debugfs.c | 10 ++

[PATCH 7/9] scsi: bnx2fc: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 60

[PATCH 2/9] scsi: qla2xxx: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent and vzalloc instead of dma_alloc_coherent and vmalloc respectively, followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha ---

[PATCH 3/9] scsi: qedi: Use zeroing allocator instead of allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/qedi/qedi_main.c | 42

[PATCH 9/9] scsi: bnx2i: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/bnx2i/bnx2i_hwi.c | 14

[PATCH 1/9] scsi: qla4xxx: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/qla4xxx/ql4_init.c | 5

[PATCH 6/9] scsi: dpt_i2o: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/dpt_i2o.c | 19

[PATCH 8/9] scsi: bfa: Use zeroing allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use vzalloc instead of vmalloc followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/bfa/bfad.c | 3 +--

[PATCH 0/9] scsi: Use zeroing allocators than allocator/memset

2017-12-30 Thread Himanshu Jha
There are many instances where a region of memory is allocated using allocator functions and immediately the region of memory is zeroed using memset function. We already have zeroing memory allocator function for that purpose and replacing the currently used allocator functions with zeroing

[GIT PULL] SCSI fixes for 4.15-rc5

2017-12-30 Thread James Bottomley
Two simple fixes, both of which cause I/O hangs.  The storvsc one is from the hyper-v which can hang under certain hot add/remove conditions and the other is generally, where removing a target and a device in close proximity can result in the release method being executed twice (and subsequent

[PATCH] scsi: imm: Replace mdelay with msleep in imm_init

2017-12-30 Thread Jia-Ju Bai
imm_init is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to reduce busy wait. Signed-off-by: Jia-Ju Bai --- drivers/scsi/imm.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git