Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330279 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-02-09 15:20 +0100 |
| Last post | 2016-02-13 23:30 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
mm, compaction: fix build errors with kcompactd Arnd Bergmann <arnd@arndb.de> - 2016-02-09 15:20 +0100
Re: mm, compaction: fix build errors with kcompactd Vlastimil Babka <vbabka@suse.cz> - 2016-02-10 15:20 +0100
Re: mm, compaction: fix build errors with kcompactd Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-02-13 23:30 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-09 15:20 +0100 |
| Subject | mm, compaction: fix build errors with kcompactd |
| Message-ID | <r0hj4-59v-25@gated-at.bofh.it> |
The newly added kcompactd code introduces multiple build errors:
include/linux/compaction.h:91:12: error: 'kcompactd_run' defined but not used [-Werror=unused-function]
mm/compaction.c:1953:2: error: implicit declaration of function 'hotcpu_notifier' [-Werror=implicit-function-declaration]
This marks the new empty wrapper functions as 'inline' to avoid unused-function warnings,
and includes linux/cpu.h to get the hotcpu_notifier declaration.
Fixes: 8364acdfa45a ("mm, compaction: introduce kcompactd")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I stumbled over this while trying out the mmots patches today for an unrelated reason.
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 1367c0564d42..d7c8de583a23 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -88,15 +88,15 @@ static inline bool compaction_deferred(struct zone *zone, int order)
return true;
}
-static int kcompactd_run(int nid)
+static inline int kcompactd_run(int nid)
{
return 0;
}
-static void kcompactd_stop(int nid)
+static inline void kcompactd_stop(int nid)
{
}
-static void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
+static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
{
}
diff --git a/mm/compaction.c b/mm/compaction.c
index 67bb651c56b1..4cb1c2ef5abb 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -7,6 +7,7 @@
*
* Copyright IBM Corp. 2007-2010 Mel Gorman <mel@csn.ul.ie>
*/
+#include <linux/cpu.h>
#include <linux/swap.h>
#include <linux/migrate.h>
#include <linux/compaction.h>
[toc] | [next] | [standalone]
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2016-02-10 15:20 +0100 |
| Message-ID | <r0DMC-3gn-15@gated-at.bofh.it> |
| In reply to | #1330279 |
On 02/09/2016 03:15 PM, Arnd Bergmann wrote:
> The newly added kcompactd code introduces multiple build errors:
>
> include/linux/compaction.h:91:12: error: 'kcompactd_run' defined but not used [-Werror=unused-function]
> mm/compaction.c:1953:2: error: implicit declaration of function 'hotcpu_notifier' [-Werror=implicit-function-declaration]
>
> This marks the new empty wrapper functions as 'inline' to avoid unused-function warnings,
> and includes linux/cpu.h to get the hotcpu_notifier declaration.
>
> Fixes: 8364acdfa45a ("mm, compaction: introduce kcompactd")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks a lot!
Vlastimil
[toc] | [prev] | [next] | [standalone]
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Date | 2016-02-13 23:30 +0100 |
| Message-ID | <r1QRr-2ra-3@gated-at.bofh.it> |
| In reply to | #1330279 |
On Tue, Feb 9, 2016 at 9:15 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> The newly added kcompactd code introduces multiple build errors:
>
> include/linux/compaction.h:91:12: error: 'kcompactd_run' defined but not used [-Werror=unused-function]
> mm/compaction.c:1953:2: error: implicit declaration of function 'hotcpu_notifier' [-Werror=implicit-function-declaration]
>
> This marks the new empty wrapper functions as 'inline' to avoid unused-function warnings,
> and includes linux/cpu.h to get the hotcpu_notifier declaration.
>
> Fixes: 8364acdfa45a ("mm, compaction: introduce kcompactd")
The 8364acdfa45a is a linux-next ID and changes on a daily basis, so you
can't really use a "Fixes" here. It doesn't matter if akpm just
squishes it into
the original, but I thought I'd mention it for future reference.
P.
..
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I stumbled over this while trying out the mmots patches today for an unrelated reason.
>
> diff --git a/include/linux/compaction.h b/include/linux/compaction.h
> index 1367c0564d42..d7c8de583a23 100644
> --- a/include/linux/compaction.h
> +++ b/include/linux/compaction.h
> @@ -88,15 +88,15 @@ static inline bool compaction_deferred(struct zone *zone, int order)
> return true;
[...]
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web