[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200609172119.20555.dtor@insightbb.com>
Date: Sun, 17 Sep 2006 21:19:19 -0400
From: Dmitry Torokhov <dtor@...ightbb.com>
To: Om Narasimhan <om.turyx@...il.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...ts.osdl.org,
linux-atm-general@...ts.sourceforge.net
Subject: Re: kmalloc to kzalloc patches for drivers/atm
On Sunday 17 September 2006 20:53, Om Narasimhan wrote:
> --- a/drivers/atm/firestream.c
> +++ b/drivers/atm/firestream.c
> @@ -1784,7 +1784,7 @@ static int __devinit fs_init (struct fs_
> write_fs (dev, RAM, (1 << (28 - FS155_VPI_BITS - FS155_VCI_BITS)) - 1);
> dev->nchannels = FS155_NR_CHANNELS;
> }
> - dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *),
> + dev->atm_vccs = kzalloc (dev->nchannels * sizeof (struct atm_vcc *),
> GFP_KERNEL);
> fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%Zd)\n",
> dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *));
>
kcalloc would be better here because you are allocating several objects
at once.
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists