Re: [PATCH] scsi: qla4xxx: Use dma_pool_zalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 13, 2016 at 4:11 PM, Javali, Nilesh
<Nilesh.Javali@xxxxxxxxxx> wrote:
>
>
> On 12/12/16, 10:16 AM, "linux-scsi-owner@xxxxxxxxxxxxxxx on behalf of
> Souptick Joarder" <linux-scsi-owner@xxxxxxxxxxxxxxx on behalf of
> jrdr.linux@xxxxxxxxx> wrote:
>
>>On Wed, Dec 7, 2016 at 1:53 AM, Souptick Joarder <jrdr.linux@xxxxxxxxx>
>>wrote:
>>> We should use dma_pool_zalloc instead of dma_pool_alloc/memset
>>>
>>> Signed-off-by: Souptick joarder <jrdr.linux@xxxxxxxxx>
>>> ---
>>>  drivers/scsi/qla4xxx/ql4_mbx.c | 3 +--
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c
>>>b/drivers/scsi/qla4xxx/ql4_mbx.c
>>> index c291fdf..f2edfd7 100644
>>> --- a/drivers/scsi/qla4xxx/ql4_mbx.c
>>> +++ b/drivers/scsi/qla4xxx/ql4_mbx.c
>>> @@ -1587,12 +1587,11 @@ int qla4xxx_get_chap(struct scsi_qla_host *ha,
>>>char *username, char *password,
>>>         struct ql4_chap_table *chap_table;
>>>         dma_addr_t chap_dma;
>>>
>>> -       chap_table = dma_pool_alloc(ha->chap_dma_pool, GFP_KERNEL,
>>>&chap_dma);
>>> +       chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL,
>>>&chap_dma);
>>>         if (chap_table == NULL)
>>>                 return -ENOMEM;
>>>
>>>         chap_size = sizeof(struct ql4_chap_table);
>>> -       memset(chap_table, 0, chap_size);
>>>
>>>         if (is_qla40XX(ha))
>>>                 offset = FLASH_CHAP_OFFSET | (idx * chap_size);
>>> --
>>> 1.9.1
>>>
>>
>>Any comment on this patch?
>
> There are multiple other places where dma_pool_alloc needs to be replaced
> by dma_pool_zalloc.


 are you asking to do this for SCSI subsystem?
 If yes, I can do that.

>
> Can you please take care within a single patch.

 But the same changes are applicable in other subsystems as well.
 I think I shouldn't send those changes in a single patch as
maintainers are different
 for different modules.

>
> Thanks,
> Nilesh
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux