Re: [patch] 2.3.17-pre1 mem_init [Re: [PATCH] 2.3.15 fancy memory

Linus Torvalds (torvalds@transmeta.com)
Sat, 4 Sep 1999 13:18:55 -0700 (PDT)


On Sat, 4 Sep 1999, David Parsons wrote:
>
> There are some cosmetic things about your patch that I didn't like
> (tweaking the output from the memory_region debug printk), so I
> modified it slightly:

Wouldm't it be much more readable with

unsigned long start = e820.map[i].addr;
unsigned long end = start + e820.map[i].size;

start = PAGE_ALIGN(start) + PAGE_OFFSET;
end = (end & PAGE_MASK) + PAGE_OFFSET;

> + size = e820.map[i].size - (PAGE_ALIGN(addr) - addr);

Ok guys, 'fess up: you had to look at that for some time before you
convinced yourself what the hell it was doing, right?

Linus

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