]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: remove unused variable in memory hotplug
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 Oct 2016 22:49:12 +0000 (15:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 Oct 2016 22:49:12 +0000 (15:49 -0700)
When I removed the per-zone bitlock hashed waitqueues in commit
9dcb8b685fc3 ("mm: remove per-zone hashtable of bitlock waitqueues"), I
removed all the magic hotplug memory initialization of said waitqueues
too.

But when I actually _tested_ the resulting build, I stupidly assumed
that "allmodconfig" would enable memory hotplug.  And it doesn't,
because it enables KASAN instead, which then disables hotplug memory
support.

As a result, my build test of the per-zone waitqueues was totally
broken, and I didn't notice that the compiler warns about the now unused
iterator variable 'i'.

I guess I should be happy that that seems to be the worst breakage from
my clearly horribly failed test coverage.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c

index b18dab401be6e9e82bc213568a2bd7f6af378389..cad4b9125695cfbfcc7509e942f6d8f8a37f460c 100644 (file)
@@ -2117,7 +2117,6 @@ void try_offline_node(int nid)
        unsigned long start_pfn = pgdat->node_start_pfn;
        unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages;
        unsigned long pfn;
-       int i;
 
        for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
                unsigned long section_nr = pfn_to_section_nr(pfn);