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

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

 



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-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux