[PATCH] makedumpfile: Remove useless definitions of return value.

Atsushi Kumagai ats-kumagai at wm.jp.nec.com
Sun Jan 3 20:11:51 PST 2016


Hello,

I'll reduce the type of return value in the next version,
please let me know if this change is inconvenient for you.


Thanks,
Atsushi Kumagai

--
From: Atsushi Kumagai <ats-kumagai at wm.jp.nec.com>
Date: Mon, 28 Dec 2015 16:22:09 +0900
Subject: [PATCH] Remove useless definitions of return value.

The five return values are defined in makedumpfile,
but the latter two are useless.

  #define COMPLETED       (0)
  #define FAILED          (1)
  #define WRONG_RELEASE   (2)     /* utsname.release does not match. */
  #define ANALYSIS_FAILED (3)     /* detected illegal page descriptor. */
  #define OUTPUT_FAILED   (4)     /* detected an output error. */

ANALYSIS_FAILED will be returned only when free_list is broken,
but I can't find any reason to give this case special treatment.
As for OUTPUT_FAILED, it isn't used at all.

Signed-off-by: Atsushi Kumagai <ats-kumagai at wm.jp.nec.com>
---
 makedumpfile.8 | 2 --
 makedumpfile.c | 1 -
 makedumpfile.h | 2 --
 3 files changed, 5 deletions(-)

diff --git a/makedumpfile.8 b/makedumpfile.8
index 6eff4f1..5fda3ed 100644
--- a/makedumpfile.8
+++ b/makedumpfile.8
@@ -635,8 +635,6 @@ makedumpfile exits with the following value.
 \fB1\fR : makedumpfile failed without the following reasons.
 .TP
 \fB2\fR : makedumpfile failed due to the different version between  \fIVMLINUX\fR and \fIVMCORE\fR.
-.TP
-\fB3\fR : makedumpfile failed due to the analysis error of the memory.
 
 .SH AUTHORS
 .PP
diff --git a/makedumpfile.c b/makedumpfile.c
index a8c9e8b..b802446 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -4706,7 +4706,6 @@ reset_bitmap_of_free_pages(unsigned long node_zones, struct cycle *cycle)
 				}
 				if (previous != curr_prev) {
 					ERRMSG("The free list is broken.\n");
-					retcd = ANALYSIS_FAILED;
 					return FALSE;
 				}
 				for (i = 0; i < (1<<order); i++) {
diff --git a/makedumpfile.h b/makedumpfile.h
index c42fc81..e626be8 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -54,8 +54,6 @@
 #define COMPLETED	(0)
 #define FAILED		(1)
 #define WRONG_RELEASE	(2)	/* utsname.release does not match. */
-#define ANALYSIS_FAILED	(3)	/* detected illegal page descriptor. */
-#define OUTPUT_FAILED	(4)	/* detected an output error. */
 
 /*
  * Type of memory management
-- 
1.9.0



More information about the kexec mailing list