[KJ] kmalloc to kzalloc patches for drivers/atm [sane version]
Dmitry Torokhov
dmitry.torokhov at gmail.com
Thu Sep 21 06:36:39 PDT 2006
Hi,
On 9/21/06, Om Narasimhan <om.turyx at gmail.com> wrote:
> - dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *),
> + dev->atm_vccs = kcalloc (sizeof (struct atm_vcc *), dev->nchannels,
> GFP_KERNEL);
kcalloc's first argument is number of elements to allocate, size is
the second argument.
>
> - scq = (struct scq_info *) kmalloc(sizeof(struct scq_info), GFP_KERNEL);
> + scq = (struct scq_info *) kzalloc(sizeof(struct scq_info), GFP_KERNEL);
Kill this cast please.
--
Dmitry
More information about the Kernel-janitors
mailing list