Re: possible power-of-2 cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 27 Aug 2007, vignesh babu wrote:

> On 8/26/07, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
> > On Sun, 26 Aug 2007, vignesh babu wrote:
> >
> > just FYI, i ran my detection script on the entire tree and came up
> > with these possibilities for power of 2 cleanup -- i'm assuming
> > you've probably seen and processed some of them.  as for the rest
> > of them, have fun.  :-)

> wow...thanks for the list...i would cleanup as many of those...will
> mail u a list of committed changes to the list and will update wiki
> with the same sometime in the next few hours...

be careful with some of them.  as i recall, there were the occasional
cases once upon a time where someone was using a construct like "tmp &
(tmp - 1)" but for some other purpose than just checking for power of
2.  so you should check the context first.

rday

p.s.  here's a grep command for tracking down potential cleanups:

grep -Er "([^\(\)]+) ?\& ?\(\1 ?- ?1\)" *


-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux