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 <[EMAIL PROTECTED]>
> ---
>
> 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 netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to