All of lore.kernel.org
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <dan.j.williams@intel.com>, <vishal.l.verma@intel.com>,
	<dave.jiang@intel.com>, <ira.weiny@intel.com>, <mingo@kernel.org>
Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH] libnvdimm/e820: Fix build error without MEMORY_HOTPLUG
Date: Wed, 26 Aug 2020 20:18:00 +0800	[thread overview]
Message-ID: <20200826121800.732-1-yuehaibing@huawei.com> (raw)

If MEMORY_HOTPLUG is n, build fails:

drivers/nvdimm/e820.c: In function ‘e820_register_one’:
drivers/nvdimm/e820.c:24:12: error: implicit declaration of function ‘phys_to_target_node’; did you mean ‘set_page_node’? [-Werror=implicit-function-declaration]
  int nid = phys_to_target_node(res->start);
            ^~~~~~~~~~~~~~~~~~~
            set_page_node

Fixes: 7b27a8622f80 ("libnvdimm/e820: Retrieve and populate correct 'target_node' info")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/nvdimm/e820.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c
index 4cd18be9d0e9..c741f029f215 100644
--- a/drivers/nvdimm/e820.c
+++ b/drivers/nvdimm/e820.c
@@ -17,6 +17,13 @@ static int e820_pmem_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifndef CONFIG_MEMORY_HOTPLUG
+static inline int phys_to_target_node(u64 start)
+{
+	return 0;
+}
+#endif
+
 static int e820_register_one(struct resource *res, void *data)
 {
 	struct nd_region_desc ndr_desc;
-- 
2.17.1

_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com>
To: <dan.j.williams@intel.com>, <vishal.l.verma@intel.com>,
	<dave.jiang@intel.com>, <ira.weiny@intel.com>, <mingo@kernel.org>
Cc: <linux-nvdimm@lists.01.org>, <linux-kernel@vger.kernel.org>,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH] libnvdimm/e820: Fix build error without MEMORY_HOTPLUG
Date: Wed, 26 Aug 2020 20:18:00 +0800	[thread overview]
Message-ID: <20200826121800.732-1-yuehaibing@huawei.com> (raw)

If MEMORY_HOTPLUG is n, build fails:

drivers/nvdimm/e820.c: In function ‘e820_register_one’:
drivers/nvdimm/e820.c:24:12: error: implicit declaration of function ‘phys_to_target_node’; did you mean ‘set_page_node’? [-Werror=implicit-function-declaration]
  int nid = phys_to_target_node(res->start);
            ^~~~~~~~~~~~~~~~~~~
            set_page_node

Fixes: 7b27a8622f80 ("libnvdimm/e820: Retrieve and populate correct 'target_node' info")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/nvdimm/e820.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c
index 4cd18be9d0e9..c741f029f215 100644
--- a/drivers/nvdimm/e820.c
+++ b/drivers/nvdimm/e820.c
@@ -17,6 +17,13 @@ static int e820_pmem_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifndef CONFIG_MEMORY_HOTPLUG
+static inline int phys_to_target_node(u64 start)
+{
+	return 0;
+}
+#endif
+
 static int e820_register_one(struct resource *res, void *data)
 {
 	struct nd_region_desc ndr_desc;
-- 
2.17.1



             reply	other threads:[~2020-08-26 12:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 12:18 YueHaibing [this message]
2020-08-26 12:18 ` [PATCH] libnvdimm/e820: Fix build error without MEMORY_HOTPLUG YueHaibing
2020-08-26 15:28 ` kernel test robot
2020-08-26 15:28   ` kernel test robot
2020-08-26 15:28   ` kernel test robot
2020-08-26 16:34 ` kernel test robot
2020-08-26 16:34   ` kernel test robot
2020-08-26 16:34   ` kernel test robot
2020-08-26 20:22 ` kernel test robot
2020-08-26 20:22   ` kernel test robot
2020-08-26 20:22   ` kernel test robot
2020-08-27  3:54 ` Yuehaibing
2020-08-27  3:54   ` Yuehaibing

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=20200826121800.732-1-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mingo@kernel.org \
    --cc=vishal.l.verma@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.