* [PATCH] mm: vmstat: Fix build error when !CONFIG_PROC_FS
@ 2015-01-20 11:33 Axel Lin
2015-01-21 22:20 ` David Rientjes
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-01-20 11:33 UTC (permalink / raw)
To: Andrew Morton; +Cc: Mel Gorman, Joonsoo Kim, linux-mm
Fix build error when CONFIG_DEBUG_FS && CONFIG_COMPACTION && !CONFIG_PROC_FS:
CC mm/vmstat.o
mm/vmstat.c:1607:11: error: 'frag_start' undeclared here (not in a function)
mm/vmstat.c:1608:10: error: 'frag_next' undeclared here (not in a function)
mm/vmstat.c:1609:10: error: 'frag_stop' undeclared here (not in a function)
make[1]: *** [mm/vmstat.o] Error 1
make: *** [mm] Error 2
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
mm/vmstat.c | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 5a47fb1..c95d6b3 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -853,6 +853,30 @@ const char * const vmstat_text[] = {
#if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)) || \
defined(CONFIG_PROC_FS)
+static void *frag_start(struct seq_file *m, loff_t *pos)
+{
+ pg_data_t *pgdat;
+ loff_t node = *pos;
+
+ for (pgdat = first_online_pgdat();
+ pgdat && node;
+ pgdat = next_online_pgdat(pgdat))
+ --node;
+
+ return pgdat;
+}
+
+static void *frag_next(struct seq_file *m, void *arg, loff_t *pos)
+{
+ pg_data_t *pgdat = (pg_data_t *)arg;
+
+ (*pos)++;
+ return next_online_pgdat(pgdat);
+}
+
+static void frag_stop(struct seq_file *m, void *arg)
+{
+}
/* Walk all the zones in a node and print using a callback */
static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat,
@@ -887,30 +911,6 @@ static char * const migratetype_names[MIGRATE_TYPES] = {
#endif
};
-static void *frag_start(struct seq_file *m, loff_t *pos)
-{
- pg_data_t *pgdat;
- loff_t node = *pos;
- for (pgdat = first_online_pgdat();
- pgdat && node;
- pgdat = next_online_pgdat(pgdat))
- --node;
-
- return pgdat;
-}
-
-static void *frag_next(struct seq_file *m, void *arg, loff_t *pos)
-{
- pg_data_t *pgdat = (pg_data_t *)arg;
-
- (*pos)++;
- return next_online_pgdat(pgdat);
-}
-
-static void frag_stop(struct seq_file *m, void *arg)
-{
-}
-
static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
struct zone *zone)
{
--
1.9.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: vmstat: Fix build error when !CONFIG_PROC_FS
2015-01-20 11:33 [PATCH] mm: vmstat: Fix build error when !CONFIG_PROC_FS Axel Lin
@ 2015-01-21 22:20 ` David Rientjes
0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2015-01-21 22:20 UTC (permalink / raw)
To: Axel Lin; +Cc: Andrew Morton, Mel Gorman, Joonsoo Kim, linux-mm
On Tue, 20 Jan 2015, Axel Lin wrote:
> Fix build error when CONFIG_DEBUG_FS && CONFIG_COMPACTION && !CONFIG_PROC_FS:
>
> CC mm/vmstat.o
> mm/vmstat.c:1607:11: error: 'frag_start' undeclared here (not in a function)
> mm/vmstat.c:1608:10: error: 'frag_next' undeclared here (not in a function)
> mm/vmstat.c:1609:10: error: 'frag_stop' undeclared here (not in a function)
> make[1]: *** [mm/vmstat.o] Error 1
> make: *** [mm] Error 2
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: David Rientjes <rientjes@google.com>
Fixes the build error that I saw with linux-next randconfig, but I'm not
sure how sane a debugfs && !procfs config is.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-21 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 11:33 [PATCH] mm: vmstat: Fix build error when !CONFIG_PROC_FS Axel Lin
2015-01-21 22:20 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).