* [PATCH 1/1] mm: Fix unused function warnings in vmstat.c
@ 2012-09-04 8:43 Luis G.F
2012-09-04 9:14 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Luis G.F @ 2012-09-04 8:43 UTC (permalink / raw)
To: kernel-janitors
frag_start(), frag_next(), frag_stop(), walk_zones_in_node() throws
compilation warnings (-Wunused-function) even when are currently used.
This patchs fix the compilation warnings in vmstat.c
Signed-off-by: Luis Gonzalez Fernandez <luisgf@gmail.com>
---
mm/vmstat.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index df7a674..e8f7dbd 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -619,7 +619,8 @@ static char * const migratetype_names[MIGRATE_TYPES] = {
"Isolate",
};
-static void *frag_start(struct seq_file *m, loff_t *pos)
+static void __attribute__((unused)) *frag_start(struct seq_file *m,
+ loff_t *pos)
{
pg_data_t *pgdat;
loff_t node = *pos;
@@ -631,7 +632,8 @@ static void *frag_start(struct seq_file *m, loff_t *pos)
return pgdat;
}
-static void *frag_next(struct seq_file *m, void *arg, loff_t *pos)
+static void __attribute__((unused)) *frag_next(struct seq_file *m,
+ void *arg, loff_t *pos)
{
pg_data_t *pgdat = (pg_data_t *)arg;
@@ -639,12 +641,13 @@ static void *frag_next(struct seq_file *m, void
*arg, loff_t *pos)
return next_online_pgdat(pgdat);
}
-static void frag_stop(struct seq_file *m, void *arg)
+static void __attribute__((unused)) 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,
+static void __attribute__((unused)) walk_zones_in_node(struct seq_file *m,
+ pg_data_t *pgdat,
void (*print)(struct seq_file *m, pg_data_t *, struct zone *))
{
struct zone *zone;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] mm: Fix unused function warnings in vmstat.c
2012-09-04 8:43 [PATCH 1/1] mm: Fix unused function warnings in vmstat.c Luis G.F
@ 2012-09-04 9:14 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-09-04 9:14 UTC (permalink / raw)
To: kernel-janitors
On Tue, Sep 04, 2012 at 10:43:27AM +0200, Luis G.F wrote:
> frag_start(), frag_next(), frag_stop(), walk_zones_in_node() throws
> compilation warnings (-Wunused-function) even when are currently used.
>
> This patchs fix the compilation warnings in vmstat.c
>
> Signed-off-by: Luis Gonzalez Fernandez <luisgf@gmail.com>
Don't send kernel janitor patches for stuff under mm/ or kernel/
etc. Best to start where there are fewer people involved. There
are a some problems with this patch, but don't fix and resend the
comments are just for educational purposes only.
The subject says "Fix" but really it's not a bug fix, it's just
silencing a warning. It doesn't change user visible behavior.
This should use the __unused define as in:
-static void *frag_start(struct seq_file *m, loff_t *pos)
+static void __unused *frag_start(struct seq_file *m, loff_t *pos)
The patch is corrupted. Read Documentation/email-clients.txt.
Send the patch to yourself and try apply it. Save the whole email
including headers and everything. `cat raw_email.txt | patch -p1`.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-04 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-04 8:43 [PATCH 1/1] mm: Fix unused function warnings in vmstat.c Luis G.F
2012-09-04 9:14 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox