linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: john.hubbard@gmail.com
To: Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, John Hubbard <jhubbard@nvidia.com>
Subject: [PATCH 1/1] mm: remove unused zone_type variable from __remove_zone()
Date: Fri, 23 Jun 2017 21:34:21 -0700	[thread overview]
Message-ID: <20170624043421.24465-2-jhubbard@nvidia.com> (raw)
In-Reply-To: <20170624043421.24465-1-jhubbard@nvidia.com>

From: John Hubbard <jhubbard@nvidia.com>

__remove_zone() is setting up zone_type, but never using
it for anything. This is not causing a warning, due to
the (necessary) use of -Wno-unused-but-set-variable.
However, it's noise, so just delete it.

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 mm/memory_hotplug.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 567a1dcafa1a..9bd73ecd7248 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -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);
-- 
2.13.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-06-24  4:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24  4:34 [PATCH 0/1] Remove unused variable from memory_hotplug.c john.hubbard
2017-06-24  4:34 ` john.hubbard [this message]
2017-06-27  5:37   ` [PATCH 1/1] mm: remove unused zone_type variable from __remove_zone() Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170624043421.24465-2-jhubbard@nvidia.com \
    --to=john.hubbard@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox