lkml.org 
[lkml]   [2007]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 7 Mar 2007 08:38:27 -0800 (PST)
FromLinus Torvalds <>
SubjectRe: ALIGN via ilog2 without gccisms (Re: [PATCH] Fix get_order())


On Wed, 7 Mar 2007, Oleg Verych wrote:
>
> Probably it can be used to get rid of gccisms and "type fluff" due to
> bitwise arithmetics in ALIGN?

Hell no.

The typeof is there to make sure we have the right type, and it's simple.

The current ALIGN() macro is efficient as hell (generating just a simple
mask+add). Turning it into some kind of horrible thing that uses ilog2()
would be a total mistake.

Also, your ALIGN() macro was broken. That's not how ALIGN() is supposed to
work.

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

\
 
 \ /
  Last update: 2007-03-07 17:41    [from the cache]
©2003-2010