Re: remap_pfm_range() Linux-2.6.10

From: Andi Kleen
Date: Wed Jan 05 2005 - 10:41:29 EST


linux-os <linux-os@xxxxxxxxxxxxxxxxxx> writes:
> remap_pfn_range(vma, vma->vm_start, base_addr >> PAGE_SHIFT, len, prot)
>
> Now, here's the $US0.02 question. Why wasn't PAGE_SHIFT put inside
> the new function? The base address cannot ever be used without
> PAGE_SHIFT. In previous versions, information hiding was properly

Because such a conversion would be very error prone. People would
likely add subtle bugs. Changing units is always dangerous.

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