Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] Fix get_order() | Date | Tue, 06 Mar 2007 18:21:39 +0000 |
| |
H. Peter Anvin <hpa@zytor.com> wrote:
> if (size <= (1UL << page_shift)) > return 0; > else > return __ilog2_u32(size-1)+1-page_shift;
I think you're right. That'll also defend against the result of __ilog2_u32() being less than page_shift-1.
I think I can dispense with the page_shift argument. IIRC __get_order() was overridden by some arch, but isn't now.
David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |