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

David Parsons (orc@pell.portland.or.us)
Sat, 4 Sep 1999 13:34:35 -0700 (PDT)


Linus Torvalds wrote:
>
>
>
> 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;

After looking at it for some time, I'm afraid I'll have to admit
you're right. I'll paperbag myself now for offenses against
coding style.

>
> > + 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?

Alas, no. I looked at the patch and said "oh, of course, it's
INTUITIVELY OBVIOUS(tm)", thus proving that nobody can ever
code-review their own code.

____
david parsons \bi/ I'll blame it all on it being Saturday.
\/

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