Skip to content

Commit

Permalink
mm/memory_hotplug.c: remove unused local zone_type from __remove_zone()
Browse files Browse the repository at this point in the history
__remove_zone() sets up up zone_type, but never uses it for anything.
This does not cause a warning, due to the (necessary) use of
-Wno-unused-but-set-variable.  However, it's noise, so just delete it.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: John Hubbard <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
johnhubbard authored and torvalds committed Jul 10, 2017
1 parent d09b646 commit a52149f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,11 +580,8 @@ static void __remove_zone(struct zone *zone, unsigned long start_pfn)
{
struct pglist_data *pgdat = zone->zone_pgdat;
int nr_pages = PAGES_PER_SECTION;
int zone_type;
unsigned long flags;

zone_type = zone - pgdat->node_zones;

pgdat_resize_lock(zone->zone_pgdat, &flags);
shrink_zone_span(zone, start_pfn, start_pfn + nr_pages);
shrink_pgdat_span(pgdat, start_pfn, start_pfn + nr_pages);
Expand Down

0 comments on commit a52149f

Please sign in to comment.