[PATCHv4] ARM: imx: Add iram allocator functions

Lothar Waßmann LW at KARO-electronics.de
Thu Oct 7 04:22:13 EDT 2010


Hi,

[...]
> +void __iomem*iram_alloc(unsigned int size, unsigned long *dma_addr)
> +{
> +	if (!iram_pool)
> +		return NULL;
> +
> +	*dma_addr = gen_pool_alloc(iram_pool, size);
> +	pr_debug("iram alloc - %dB at 0x%p\n", size, (void *)*dma_addr);
why not:
| +	pr_debug("iram alloc - %dB at 0x08lx\n", size, *dma_addr);

> +	if (!dma_addr)
>
This will never be true (unless someone passes a NULL pointer as
dma_addr).
| +	if (!*dma_addr)
was obviously meant here.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-arm-kernel mailing list