Re: [PATCH] x86_64: clean up find_e820_area

From: Ingo Molnar
Date: Thu Feb 07 2008 - 03:13:09 EST



* Yinghai Lu <Yinghai.Lu@xxxxxxx> wrote:

> [PATCH] x86_64: clean up find_e820_area
>
> change size to unsigned long, becase caller and user all used unsigned
> long. also make bad_addr take align.

thanks, applied.

[ tiny nitpicking detail:

> -static inline int bad_addr(unsigned long *addrp, unsigned long size)
> +static inline int bad_addr(unsigned long *addrp, unsigned long size, unsigned long align)

please run scripts/checkpatch.pl over your patches, that would have
caught the above overlong line. ]

> @@ -105,7 +105,7 @@ again:
> for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) {
> struct early_res *r = &early_res[i];
> if (last >= r->start && addr < r->end) {
> - *addrp = addr = r->end;
> + *addrp = addr = round_up(r->end, align);

nice! This makes the reservation intent and effect much clearer.

Ingo
--
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/