[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020607190138o16e596efp2f33acef0966c65e@mail.gmail.com>
Date: Wed, 19 Jul 2006 11:38:27 +0300
From: "Pekka Enberg" <penberg@...helsinki.fi>
To: "Daniel K." <daniel@...ded.net>
Cc: "Panagiotis Issaris" <takis@...umba.uhasselt.be>,
linux-kernel@...r.kernel.org, len.brown@...el.com,
chas@....nrl.navy.mil, miquel@...uba.ar, kkeil@...e.de,
benh@...nel.crashing.org, video4linux-list@...hat.com,
rmk+mmc@....linux.org.uk, Neela.Kolli@...enio.com,
jgarzik@...ox.com, vandrove@...cvut.cz, adaplas@....net,
thomas@...ischhofer.net, weissg@...nna.at, philb@....org,
linux-pcmcia@...ts.infradead.org, jkmaline@...hut.fi,
paulus@...ba.org
Subject: Re: [PATCH] drivers: Conversions from kmalloc+memset to k(z|c)alloc.
On 7/19/06, Daniel K. <daniel@...ded.net> wrote:
> > diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
> > index 5ff269f..ca0e9f2 100644
> > --- a/drivers/serial/ip22zilog.c
> > +++ b/drivers/serial/ip22zilog.c
> > @@ -925,11 +925,7 @@ static int zilog_irq = -1;
> > static void * __init alloc_one_table(unsigned long size)
> > {
> > void *ret;
> > -
> > - ret = kmalloc(size, GFP_KERNEL);
> > - if (ret != NULL)
> > - memset(ret, 0, size);
> > -
> > + ret = kzalloc(size, GFP_KERNEL);
> > return ret;
> > }
>
> And here as well.
>
> What is preferred by developers?
That you kill useless wrappers and type casts.
-
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