[OpenBIOS] [PATCH] ppc: fix stack usage in mmu_claim, mem_claim

Segher Boessenkool segher at kernel.crashing.org
Wed Jun 17 23:10:18 CEST 2015


On Wed, Jun 17, 2015 at 03:19:41PM -0500, Cormac O'Brien wrote:
> The 'phys' argument to mem_claim() and 'virt' argument to mmu_claim() are now
> only popped from the stack if the 'align' argument is provided.

You probably also want to mention you no longer THROW when the
return value is -1 (and explain why).

> +	phys_addr_t phys = -1UL;

Is this the common style in this code?  Will "long int" always fit
phys_addr_t?  Seems shaky.


Segher



More information about the OpenBIOS mailing list