mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
scsi: megaraid: Use dma_pool_zalloc()
Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
b0f9408b14
commit
61b142afb2
1 changed files with 1 additions and 2 deletions
|
@ -4022,7 +4022,7 @@ static int megasas_create_frame_pool(struct megasas_instance *instance)
|
||||||
|
|
||||||
cmd = instance->cmd_list[i];
|
cmd = instance->cmd_list[i];
|
||||||
|
|
||||||
cmd->frame = dma_pool_alloc(instance->frame_dma_pool,
|
cmd->frame = dma_pool_zalloc(instance->frame_dma_pool,
|
||||||
GFP_KERNEL, &cmd->frame_phys_addr);
|
GFP_KERNEL, &cmd->frame_phys_addr);
|
||||||
|
|
||||||
cmd->sense = dma_pool_alloc(instance->sense_dma_pool,
|
cmd->sense = dma_pool_alloc(instance->sense_dma_pool,
|
||||||
|
@ -4038,7 +4038,6 @@ static int megasas_create_frame_pool(struct megasas_instance *instance)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(cmd->frame, 0, instance->mfi_frame_size);
|
|
||||||
cmd->frame->io.context = cpu_to_le32(cmd->index);
|
cmd->frame->io.context = cpu_to_le32(cmd->index);
|
||||||
cmd->frame->io.pad_0 = 0;
|
cmd->frame->io.pad_0 = 0;
|
||||||
if ((instance->adapter_type == MFI_SERIES) && reset_devices)
|
if ((instance->adapter_type == MFI_SERIES) && reset_devices)
|
||||||
|
|
Loading…
Add table
Reference in a new issue