linux-next: build failure after merge of the akpm-current tree

From: Stephen Rothwell
Date: Thu Oct 16 2014 - 00:57:21 EST


Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

In file included from mm/memcontrol.c:28:0:
include/linux/page_counter.h: In function 'page_counter_init':
include/linux/page_counter.h:19:27: error: 'LONG_MAX' undeclared (first use in this function)
#define PAGE_COUNTER_MAX (LONG_MAX / PAGE_SIZE)
^
include/linux/page_counter.h:26:19: note: in expansion of macro 'PAGE_COUNTER_MAX'
counter->limit = PAGE_COUNTER_MAX;
^
include/linux/page_counter.h:19:27: note: each undeclared identifier is reported only once for each function it appears in
#define PAGE_COUNTER_MAX (LONG_MAX / PAGE_SIZE)
^
include/linux/page_counter.h:26:19: note: in expansion of macro 'PAGE_COUNTER_MAX'
counter->limit = PAGE_COUNTER_MAX;
^
include/linux/page_counter.h:19:38: error: 'PAGE_SIZE' undeclared (first use in this function)
#define PAGE_COUNTER_MAX (LONG_MAX / PAGE_SIZE)
^
include/linux/page_counter.h:26:19: note: in expansion of macro 'PAGE_COUNTER_MAX'
counter->limit = PAGE_COUNTER_MAX;
^
In file included from mm/page_counter.c:7:0:
include/linux/page_counter.h: In function 'page_counter_init':
include/linux/page_counter.h:19:27: error: 'LONG_MAX' undeclared (first use in this function)
#define PAGE_COUNTER_MAX (LONG_MAX / PAGE_SIZE)
^
include/linux/page_counter.h:26:19: note: in expansion of macro 'PAGE_COUNTER_MAX'
counter->limit = PAGE_COUNTER_MAX;
^
include/linux/page_counter.h:19:27: note: each undeclared identifier is reported only once for each function it appears in
#define PAGE_COUNTER_MAX (LONG_MAX / PAGE_SIZE)
^
include/linux/page_counter.h:26:19: note: in expansion of macro 'PAGE_COUNTER_MAX'
counter->limit = PAGE_COUNTER_MAX;
^
include/linux/page_counter.h:19:38: error: 'PAGE_SIZE' undeclared (first use in this function)
#define PAGE_COUNTER_MAX (LONG_MAX / PAGE_SIZE)
^
include/linux/page_counter.h:26:19: note: in expansion of macro 'PAGE_COUNTER_MAX'
counter->limit = PAGE_COUNTER_MAX;
^

Caused by commit 36a1bfb2a772 ("mm: memcontrol: lockless page
counters"). See Rule 1 in Documentation/SubmitChecklist.

I have added the following patch for today:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 16 Oct 2014 15:49:08 +1100
Subject: [PATCH] mm: memcontrol: add includes for page_counter.h

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/linux/page_counter.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/include/linux/page_counter.h b/include/linux/page_counter.h
index a878ef61d073..785640e4efec 100644
--- a/include/linux/page_counter.h
+++ b/include/linux/page_counter.h
@@ -2,6 +2,9 @@
#define _LINUX_PAGE_COUNTER_H

#include <linux/atomic.h>
+#include <linux/kernel.h>
+
+#include <asm/page.h>

struct page_counter {
atomic_long_t count;
--
2.1.1


--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

Attachment: signature.asc
Description: PGP signature