public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: Simon Horman <horms@verge.net.au>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 4/4] kexec-tools: sh: Remove saved_max_mem
Date: Sun, 26 May 2013 11:41:58 +0800	[thread overview]
Message-ID: <51A18486.10009@gmail.com> (raw)
In-Reply-To: <51A183B0.7000607@gmail.com>

From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>

saved_max_mem is used to calculate the amount of memory that the previous
kernel used. It seems in sh, we just calculate this variable, but we
never use it. So remove it.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
 kexec/arch/sh/crashdump-sh.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/kexec/arch/sh/crashdump-sh.c b/kexec/arch/sh/crashdump-sh.c
index 68ca756..fe11b17 100644
--- a/kexec/arch/sh/crashdump-sh.c
+++ b/kexec/arch/sh/crashdump-sh.c
@@ -31,8 +31,6 @@
 #define CRASH_MAX_MEMORY_RANGES 64
 static struct memory_range crash_memory_range[CRASH_MAX_MEMORY_RANGES];
 
-uint64_t saved_max_mem;
-
 static int crash_sh_range_nr;
 static int crash_sh_memory_range_callback(void *UNUSED(data), int UNUSED(nr),
 					  char *str,
@@ -54,9 +52,6 @@ static int crash_sh_memory_range_callback(void *UNUSED(data), int UNUSED(nr),
 		range->end = base + length - 1;
 		range->type = RANGE_RAM;
 		crash_sh_range_nr++;
-
-		if (saved_max_mem < range->end)
-			saved_max_mem = range->end;
 	}
 
 	if (strncmp(str, "Crash kernel\n", 13) == 0) {
@@ -80,7 +75,6 @@ static int crash_sh_memory_range_callback(void *UNUSED(data), int UNUSED(nr),
 static int crash_get_memory_ranges(struct memory_range **range, int *ranges)
 {
 	crash_sh_range_nr = 0;
-	saved_max_mem = 0;
 
 	kexec_iomem_for_each_line(NULL, crash_sh_memory_range_callback, NULL);
 	*range = crash_memory_range;
-- 
1.7.1

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2013-05-26  3:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-26  3:38 [PATCH 0/4] kexec-tools: Remove saved_max_mem Zhang Yanfei
2013-05-26  3:40 ` [PATCH 1/4] kexec-tools: mips: " Zhang Yanfei
2013-05-26  3:40 ` [PATCH 2/4] kexec-tools: ppc: " Zhang Yanfei
2013-05-26  3:41 ` [PATCH 3/4] kexec-tools: ppc64: " Zhang Yanfei
2013-05-26  3:41 ` Zhang Yanfei [this message]
2013-05-28 22:35 ` [PATCH 0/4] kexec-tools: " Eric W. Biederman
2013-06-10  8:35   ` Simon Horman

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=51A18486.10009@gmail.com \
    --to=zhangyanfei.yes@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.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