[KJ] kmalloc to kzalloc patches for drivers/block [sane version]
Paulo Marques
pmarques at grupopie.com
Fri Sep 22 04:32:15 PDT 2006
Jiri Slaby wrote:
> Om Narasimhan wrote:
>> [...]
>> --- a/drivers/block/cpqarray.c
>> +++ b/drivers/block/cpqarray.c
>> @@ -424,7 +424,7 @@ static int __init cpqarray_register_ctlr
>> hba[i]->cmd_pool = (cmdlist_t *)pci_alloc_consistent(
>> hba[i]->pci_dev, NR_CMDS * sizeof(cmdlist_t),
>> &(hba[i]->cmd_pool_dhandle));
>> - hba[i]->cmd_pool_bits = kmalloc(
>> + hba[i]->cmd_pool_bits = kzalloc(
>> ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long),
>> GFP_KERNEL);
>
> kcalloc?
Agreed on every comment except this one. That complex expression is
really just a constant in the end, so there is no point in using kcalloc.
--
Paulo Marques - www.grupopie.com
"The face of a child can say it all, especially the
mouth part of the face."
More information about the Kernel-janitors
mailing list