lkml.org 
[lkml]   [2005]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.6.11-rc3-mm1: fix swsusp with gcc 3.4
On Fri, Feb 04, 2005 at 10:33:50AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.11-rc2-mm2:
>...
> +swsusp-do-not-use-higher-order-memory-allocations-on-suspend.patch
>
> swsusp fix
>...

This broke compilation with gcc 3.4:

<-- snip -->

...
CC kernel/power/swsusp.o
kernel/power/swsusp.c: In function `alloc_pagedir':
kernel/power/swsusp.c:608: sorry, unimplemented: inlining failed in call
to 'free_pagedir': function body not available
kernel/power/swsusp.c:646: sorry, unimplemented: called from here
make[2]: *** [kernel/power/swsusp.o] Error 1

<-- snip -->


The fix is simple:

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

kernel/power/swsusp.c | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)

--- linux-2.6.11-rc3-mm1-full/kernel/power/swsusp.c.old 2005-02-04 20:50:16.000000000 +0100
+++ linux-2.6.11-rc3-mm1-full/kernel/power/swsusp.c 2005-02-04 20:51:18.000000000 +0100
@@ -605,7 +605,20 @@
return nr_copy;
}

-static inline void free_pagedir(struct pbe *pblist);
+/**
+ * free_pagedir - free pages allocated with alloc_pagedir()
+ */
+
+static inline void free_pagedir(struct pbe *pblist)
+{
+ struct pbe *pbe;
+
+ while (pblist) {
+ pbe = pblist + PB_PAGE_SKIP;
+ pblist = pbe->next;
+ free_page((unsigned long)pblist);
+ }
+}

/**
* alloc_pagedir - Allocate the page directory.
@@ -651,21 +664,6 @@
}

/**
- * free_pagedir - free pages allocated with alloc_pagedir()
- */
-
-static inline void free_pagedir(struct pbe *pblist)
-{
- struct pbe *pbe;
-
- while (pblist) {
- pbe = pblist + PB_PAGE_SKIP;
- pblist = pbe->next;
- free_page((unsigned long)pblist);
- }
-}
-
-/**
* free_image_pages - Free pages allocated for snapshot
*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.374 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site