OSDN Git Service

[GCC4] SPARC64: fix UP build error in arch/sparc64/mm/init.c
authorMikael Pettersson <mikpe@it.uu.se>
Sun, 20 Aug 2006 20:18:10 +0000 (22:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Aug 2006 20:53:14 +0000 (22:53 +0200)
This patch fixes an invalid-lvalue error when compiling a
2.4.34-pre1 kernel on sparc64 with gcc-4.1.1. The kernel
must be configured with CONFIG_SMP=n for the error to trigger.
(I didn't save the error message, sorry.)

A kernel compiled with gcc-4.1.1 boots fine on my Ultra5
and can rebuild itself, and generally seems no less solid
than the 2.4.33 I compiled with gcc-3.4.6.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
arch/sparc64/mm/init.c

index 9ea5957..5a4d297 100644 (file)
@@ -95,7 +95,7 @@ int do_check_pgt_cache(int low, int high)
                                 if (page2)
                                         page2->next_hash = page->next_hash;
                                 else
-                                        (struct page *)pgd_quicklist = page->next_hash;
+                                        pgd_quicklist = (unsigned long *)page->next_hash;
                                 page->next_hash = NULL;
                                 page->pprev_hash = NULL;
                                 pgd_cache_size -= 2;