Re: kmalloc to kzalloc patches for drivers/atm [sane version]

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

 



Hi,

On 9/21/06, Om Narasimhan <[email protected]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux