Re: [PATCH v2 2/3] staging: dgnc: driver.c and tty.c: replaces dgnc_driver_kzmalloc with kzalloc

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

 



On Tue, Aug 27, 2013 at 10:13:27PM -0400, Lidza Louina wrote:
> This patch replaces dgnc_driver_kzmalloc with kzalloc.
> A patch that follows removes the dgnc_driver_kzmalloc
> function.
> 
> Signed-off-by: Lidza Louina <lidza.louina@xxxxxxxxx>
> ---
>  drivers/staging/dgnc/dgnc_driver.c |  6 +++---
>  drivers/staging/dgnc/dgnc_tty.c    | 20 ++++++++++----------
>  2 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index 8032368..4226f09 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -501,7 +501,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
>  
>  	/* get the board structure and prep it */
>  	brd = dgnc_Board[dgnc_NumBoards] =
> -	(struct board_t *) dgnc_driver_kzmalloc(sizeof(struct board_t), GFP_KERNEL);
> +	(struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);

I'll take this for now, but all of these casts of the kzalloc() call
need to go away, as they are pointless (kzalloc() returns a void *,
which automatically can be assigned to any pointer type, no need to be
explicit about it.)

So that means you'll get another patch accepted modifying these same
lines now :)

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux