[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3523.1173205299@redhat.com>
Date: Tue, 06 Mar 2007 18:21:39 +0000
From: David Howells <dhowells@...hat.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: torvalds@...l.org, akpm@...l.org, benh@...nel.crashing.org,
linux-kernel@...r.kernel.org, johannes@...solutions.net
Subject: Re: [PATCH] Fix get_order()
H. Peter Anvin <hpa@...or.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists