[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0708131123020.2277@localhost.localdomain>
Date: Mon, 13 Aug 2007 11:24:10 -0400 (EDT)
From: "Robert P. J. Day" <rpjday@...dspring.com>
To: Surya Prabhakar N <surya.prabhakar@...ro.com>
cc: netdev@...r.kernel.org, Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [KJ] replacing kmalloc with kzalloc in drivers/net/sb1250-mac.c
On Mon, 13 Aug 2007, Surya Prabhakar N wrote:
> Hi,
> Replacing kmalloc with kzalloc and cleaning up memset in
> drivers/net/sb1250-mac.c
>
>
> Signed-off-by: Surya Prabhakar <surya.prabhakar@...ro.com>
> ---
>
> diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
> index e7fdcf1..2dca5a7 100644
> --- a/drivers/net/sb1250-mac.c
> +++ b/drivers/net/sb1250-mac.c
> @@ -760,7 +760,7 @@ static void sbdma_initctx(sbmacdma_t *d,
>
> d->sbdma_dscrtable_unaligned =
> d->sbdma_dscrtable = (sbdmadscr_t *)
^^^^^^^^^^^^^^^
> - kmalloc((d->sbdma_maxdescr+1)*sizeof(sbdmadscr_t), GFP_KERNEL);
> + kzalloc((d->sbdma_maxdescr+1)*sizeof(sbdmadscr_t), GFP_KERNEL);
i'm fairly sure you can drop all of those superfluous casts when
calling one of those memory allocation routines.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
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