[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 3 Mar 2012 04:09:09 +0400
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Pekka Enberg <penberg@...nel.org>
Cc: John Stultz <john.stultz@...aro.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org
Subject: [PATCH 1/3] vmevent: Fix build for SWAP=n case
Caught this build failure:
CC mm/vmevent.o
mm/vmevent.c:17:6: error: expected identifier or '(' before numeric constant
mm/vmevent.c:18:1: warning: no semicolon at end of struct or union [enabled by default]
mm/vmevent.c: In function 'vmevent_sample':
mm/vmevent.c:84:36: error: expected identifier before numeric constant
make[1]: *** [mm/vmevent.o] Error 1
make: *** [mm/] Error 2
This is because linux/swap.h defines nr_swap_pages to 0L, and so things
break.
Fix this by undefinding it back, as we don't use it anyway.
Signed-off-by: Anton Vorontsov <anton.vorontsov@...aro.org>
---
The patch is for git://github.com/penberg/linux.git vmevent/core.
mm/vmevent.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mm/vmevent.c b/mm/vmevent.c
index 37d2c5f..2342752 100644
--- a/mm/vmevent.c
+++ b/mm/vmevent.c
@@ -6,6 +6,7 @@
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/swap.h>
+#undef nr_swap_pages /* This is defined to a constant for SWAP=n case */
#define VMEVENT_MAX_FREE_THRESHOD 100
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists