[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0706041431310.29896@twin.jikos.cz>
Date: Mon, 4 Jun 2007 14:33:05 +0200 (CEST)
From: Jiri Kosina <jikos@...os.cz>
To: Adrian Bunk <bunk@...sta.de>
cc: Rolf Eike Beer <eike-kernel@...tec.de>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>, stable@...nel.org
Subject: Re: [PATCH] Fix roundup_pow_of_two(1)
On Mon, 4 Jun 2007, Adrian Bunk wrote:
> > 1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It does
> > in case the argument is a variable but in case it's a constant it behaves
> > wrong and returns 0. Probably nobody ever did it so this was never noticed.
> I'm not getting the problem.
> 2^0 = 1
Adrian,
that's of course true, but unrelated to the patch in question :)
You simply want roundup_pow_of_two(1) to be 1, and not 0. That's what the
patch does, and that's correct.
--
Jiri Kosina
-
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