Re: [PATCH 06/39] lmb: Seperate __lmb_find_base() from__lmb_alloc_base()

From: Benjamin Herrenschmidt
Date: Mon Apr 12 2010 - 23:59:36 EST


On Thu, 2010-04-08 at 23:03 -0700, Yinghai Lu wrote:

> + return -1ULL;
> +}

Defininf some kind of LMB_ERROR would be nicer.

Cheers,
Ben.

> +u64 __init __lmb_alloc_base(u64 size, u64 align, u64 max_addr)
> +{
> + u64 base;
> +
> + base = __lmb_find_base(size, align, max_addr);
> +
> + if (base == -1ULL)
> + return 0;
> +
> + if (lmb_add_region(&lmb.reserved, base, size) < 0)
> + return 0;
> +
> + return base;
> }
>
> /* You must call lmb_analyze() before this. */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/