diff options
| author | Olof Johansson <olof@lixom.net> | 2018-09-25 11:30:47 -0700 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2018-09-25 11:30:47 -0700 |
| commit | cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1 (patch) | |
| tree | 2628d4922d0675df5659439f22f5ebda9c4b302a /drivers/base | |
| parent | bf1da406909b13903873d1f91346f99303fd8cb3 (diff) | |
| parent | 11da3a7f84f19c26da6f86af878298694ede0804 (diff) | |
Merge tag 'v4.19-rc3' into next/drivers
Linux 4.19-rc3
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/memory.c | 20 | ||||
| -rw-r--r-- | drivers/base/power/clock_ops.c | 2 |
2 files changed, 10 insertions, 12 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c8a1cb0b6136..817320c7c4c1 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -417,25 +417,23 @@ static ssize_t show_valid_zones(struct device *dev, int nid; /* - * The block contains more than one zone can not be offlined. - * This can happen e.g. for ZONE_DMA and ZONE_DMA32 - */ - if (!test_pages_in_a_zone(start_pfn, start_pfn + nr_pages, &valid_start_pfn, &valid_end_pfn)) - return sprintf(buf, "none\n"); - - start_pfn = valid_start_pfn; - nr_pages = valid_end_pfn - start_pfn; - - /* * Check the existing zone. Make sure that we do that only on the * online nodes otherwise the page_zone is not reliable */ if (mem->state == MEM_ONLINE) { + /* + * The block contains more than one zone can not be offlined. + * This can happen e.g. for ZONE_DMA and ZONE_DMA32 + */ + if (!test_pages_in_a_zone(start_pfn, start_pfn + nr_pages, + &valid_start_pfn, &valid_end_pfn)) + return sprintf(buf, "none\n"); + start_pfn = valid_start_pfn; strcat(buf, page_zone(pfn_to_page(start_pfn))->name); goto out; } - nid = pfn_to_nid(start_pfn); + nid = mem->nid; default_zone = zone_for_pfn_range(MMOP_ONLINE_KEEP, nid, start_pfn, nr_pages); strcat(buf, default_zone->name); diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 8e2e4757adcb..5a42ae4078c2 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -185,7 +185,7 @@ EXPORT_SYMBOL_GPL(of_pm_clk_add_clk); int of_pm_clk_add_clks(struct device *dev) { struct clk **clks; - unsigned int i, count; + int i, count; int ret; if (!dev || !dev->of_node) |
