lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Jun 2014 14:53:45 +0300
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	Joe Perches <joe@...ches.com>, <linux-kernel@...r.kernel.org>
CC:	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	<linux-fbdev@...r.kernel.org>
Subject: Re: [PATCH -next 25/26] fbdev: Use dma_zalloc_coherent

On 15/06/14 23:37, Joe Perches wrote:
> Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
> 
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>  drivers/video/fbdev/da8xx-fb.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
> index a8484f7..788f6b3 100644
> --- a/drivers/video/fbdev/da8xx-fb.c
> +++ b/drivers/video/fbdev/da8xx-fb.c
> @@ -1447,18 +1447,15 @@ static int fb_probe(struct platform_device *device)
>  		da8xx_fb_fix.line_length - 1;
>  
>  	/* allocate palette buffer */
> -	par->v_palette_base = dma_alloc_coherent(NULL,
> -					       PALETTE_SIZE,
> -					       (resource_size_t *)
> -					       &par->p_palette_base,
> -					       GFP_KERNEL | GFP_DMA);
> +	par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
> +						  (resource_size_t *)&par->p_palette_base,
> +						  GFP_KERNEL | GFP_DMA);
>  	if (!par->v_palette_base) {
>  		dev_err(&device->dev,
>  			"GLCD: kmalloc for palette buffer failed\n");
>  		ret = -EINVAL;
>  		goto err_release_fb_mem;
>  	}
> -	memset(par->v_palette_base, 0, PALETTE_SIZE);
>  
>  	par->irq = platform_get_irq(device, 0);
>  	if (par->irq < 0) {
> 

Thanks, queued for 3.17.

 Tomi



Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ