Re: [PATCH v6 04/12] mm/hotplug: Prepare shrink_{zone, pgdat}_span for sub-section removal
From: Dan Williams
Date: Fri Apr 19 2019 - 19:13:54 EST
On Fri, Apr 19, 2019 at 4:09 PM Ralph Campbell <rcampbell@xxxxxxxxxx> wrote:
[..]
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > index 8b7415736d21..d5874f9d4043 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -327,10 +327,10 @@ static unsigned long find_smallest_section_pfn(int nid, struct zone *zone,
> > {
> > struct mem_section *ms;
> >
> > - for (; start_pfn < end_pfn; start_pfn += PAGES_PER_SECTION) {
> > + for (; start_pfn < end_pfn; start_pfn += PAGES_PER_SUB_SECTION) {
> > ms = __pfn_to_section(start_pfn);
> >
> > - if (unlikely(!valid_section(ms)))
> > + if (unlikely(!pfn_valid(start_pfn)))
> > continue;
>
> Note that "struct mem_section *ms;" is now set but not used.
> You can remove the definition and initialization of "ms".
Good eye, yes, will clean up.