mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Yu Zhao <yuzhao@google.com>
Subject: [PATCH] mm: fix potential build error in compaction.h
Date: Fri,  8 Feb 2019 01:04:37 -0700	[thread overview]
Message-ID: <20190208080437.253322-1-yuzhao@google.com> (raw)

Declaration of struct node is required regardless. On UMA system,
including compaction.h without proceeding node.h shouldn't cause
build error.

Signed-off-by: Yu Zhao <yuzhao@google.com>
---
 include/linux/compaction.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 68250a57aace..be165b220996 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -220,22 +220,22 @@ static inline int kcompactd_run(int nid)
 static inline void kcompactd_stop(int nid)
 {
 }
 
 static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
 {
 }
 
 #endif /* CONFIG_COMPACTION */
 
-#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
 struct node;
+#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
 extern int compaction_register_node(struct node *node);
 extern void compaction_unregister_node(struct node *node);
 
 #else
 
 static inline int compaction_register_node(struct node *node)
 {
 	return 0;
 }
 
-- 
2.20.1.791.gb4d0f1c61a-goog


             reply	other threads:[~2019-02-08  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  8:04 Yu Zhao [this message]
2019-02-12 12:03 ` Michal Hocko
2019-02-12 23:38   ` Yu Zhao
2019-02-13 13:00     ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190208080437.253322-1-yuzhao@google.com \
    --to=yuzhao@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®