2004-10-12 00:18:50

by Blaisorblade

[permalink] [raw]
Subject: [patch 1/6] uml: fix wrong type for rb_entry call


With the type-safe rb_entry (based on container_of, I sent it) I discovered
this type error, so I've fixed it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
---

linux-2.6.9-current-paolo/arch/um/kernel/physmem.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/um/kernel/physmem.c~uml-fix-wrong-type arch/um/kernel/physmem.c
--- linux-2.6.9-current/arch/um/kernel/physmem.c~uml-fix-wrong-type 2004-10-12 01:05:58.196762360 +0200
+++ linux-2.6.9-current-paolo/arch/um/kernel/physmem.c 2004-10-12 01:05:58.198762056 +0200
@@ -36,7 +36,7 @@ static struct rb_node **find_rb(void *vi
struct phys_desc *d;

while(*n != NULL){
- d = rb_entry(n, struct phys_desc, rb);
+ d = rb_entry(*n, struct phys_desc, rb);
if(d->virt == virt)
return(n);

@@ -56,7 +56,7 @@ static struct phys_desc *find_phys_mappi
if(*n == NULL)
return(NULL);

- return(rb_entry(n, struct phys_desc, rb));
+ return(rb_entry(*n, struct phys_desc, rb));
}

static void insert_phys_mapping(struct phys_desc *desc)
_