Skip to content
Permalink
Browse files
libnvdimm/e820: Fix build error without MEMORY_HOTPLUG
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: 7b27a86 ("libnvdimm/e820: Retrieve and populate correct 'target_node' info")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
  • Loading branch information
YueHaibing authored and intel-lab-lkp committed Aug 26, 2020
1 parent 03b68d5 commit 4c003ae129dccea4445a55e9e2c61de5922fbd37
Showing 1 changed file with 7 additions and 0 deletions.
@@ -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;

0 comments on commit 4c003ae

Please sign in to comment.