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
> +++
From: Peter Lund <[EMAIL PROTECTED]>
Negative shifts are not allowed in C (the result is undefined).
It works on most platforms but not on the VAX with gcc 4.0.1 (it results in an
"operand reserved" fault).
Applies to Linux 2.6.22.
Signed-off-by: Peter Lund <[EMAIL PROTECTED]>
---
Shifting by
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 =
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_BITS
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-tree.c
From: Peter Lund [EMAIL PROTECTED]
Negative shifts are not allowed in C (the result is undefined).
It works on most platforms but not on the VAX with gcc 4.0.1 (it results in an
operand reserved fault).
Applies to Linux 2.6.22.
Signed-off-by: Peter Lund [EMAIL PROTECTED]
---
Shifting by more
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
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 shift
On Sat, 2007-08-25 16:26:07 +0200, Peter Firefly Lund <[EMAIL PROTECTED]> wrote:
> --- lib/radix-tree-old.c 2007-08-25 15:36:40.0 +0200
> +++ lib/radix-tree.c 2007-08-25 15:36:51.0 +0200
> @@ -980,12 +980,14 @@ radix_tree_node_ctor(void *node, struct
>
> static __init
On Sat, 2007-08-25 16:26:07 +0200, Peter Firefly Lund [EMAIL PROTECTED] wrote:
--- lib/radix-tree-old.c 2007-08-25 15:36:40.0 +0200
+++ lib/radix-tree.c 2007-08-25 15:36:51.0 +0200
@@ -980,12 +980,14 @@ radix_tree_node_ctor(void *node, struct
static __init unsigned
([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 shift by a negative amount first
and only then fix the situation by ignoring
([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 shift by a negative amount first
and only then fix the situation by ignoring
12 matches
Mail list logo