Re: [KJ] replacing kmalloc with kzalloc in drivers/net/sb1250-mac.c

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

 



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 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