Re: [PATCH] avoid negative shifts in radix-tree.c, take 2

2007-08-29 Thread Andreas Schwab
Peter Lund <[EMAIL PROTECTED]> writes: > Shifting by more than the width of the value on the left is also not allowed. Shifting by the width of the value is not allowed as well. > --- linux-2.6.22/lib/radix-tree.c.orig2007-08-27 15:42:37.0 > +0200 > +++ linux-2.6.22/lib/radix-tr

Re: [PATCH] avoid negative shifts in radix-tree.c

2007-08-29 Thread Maciej W. Rozycki
On Mon, 27 Aug 2007, Christoph Hellwig wrote: > The conceptual change looks fine to me, but the code looks a little odd, > what about: > > static __init unsigned long __maxindex(unsigned int height) > { > unsigned int tmp = height * RADIX_TREE_MAP_SHIFT; > int shift = RADIX_TREE_INDEX

Re: [PATCH] avoid negative shifts in radix-tree.c

2007-08-27 Thread Christoph Hellwig
On Sat, Aug 25, 2007 at 04:26:07PM +0200, Peter Firefly Lund wrote: > ([EMAIL PROTECTED] only bcc'ed because it's subscribers only, > Lameter addressed because I think he touched the code last, Velikov and > Hellwig because they touched the code first.) > > The current code in __max_index() will s