kexec: ppc: Use die() instead of fatal()
Subsystems (2)
PATCH 1/1 kexec: ppc: Use die() instead of fatal()
From: Zhang Yanfei <[email protected]>
fatal() nearly does the same thing as die() does, so this is kind of duplicate. Remove fatal() and use die() instead.
Signed-off-by Zhang Yanfei <[email protected]>
--- kexec/arch/ppc/fixup_dtb.c | 8 ++++---- kexec/arch/ppc/libfdt-wrapper.c | 8 ++++---- kexec/arch/ppc/ops.h | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-)
kexec/arch/ppc/fixup_dtb.c +4 -4
@@ -54,7 +54,7 @@ static void fixup_nodes(char *nodes[]) len =asprintf (&fname,"%s%s" , proc_dts, nodes[index]);if (len <0 ) -fatal ("asprintf() failed\n" ); +die ("asprintf() failed\n" ); content =slurp_file (fname, &content_size);if (!content) {
@@ -78,7 +78,7 @@ static void fixup_nodes(char *nodes[]) ret =setprop (node, prop_name, content, content_size);if (ret <0 ) -fatal ("setprop of %s/%s size: %ld failed: %s\n" , +die ("setprop of %s/%s size: %ld failed: %s\n" , node_name, prop_name, content_size,fdt_strerror (ret));
@@ -125,10 +125,10 @@ static char *expand_buf(int minexpand, char *blob_buf, off_t *blob_size) size =_ALIGN (size + minexpand,EXPAND_GRANULARITY ); blob_buf =realloc (blob_buf, size);if (!blob_buf) -fatal ("Couldn't find %d bytes to expand device tree\n\r" , size); +die ("Couldn't find %d bytes to expand device tree\n\r" , size); rc =fdt_open_into (blob_buf, blob_buf, size);if (rc !=0 ) -fatal ("Couldn't expand fdt into new buffer: %s\n\r" , +die ("Couldn't expand fdt into new buffer: %s\n\r" ,fdt_strerror (rc)); *blob_size =fdt_totalsize (blob_buf);
kexec/arch/ppc/libfdt-wrapper.c +4 -4
@@ -66,10 +66,10 @@ static void expand_buf(int minexpand) size =_ALIGN (size + minexpand,EXPAND_GRANULARITY ); buf =realloc (buf, size);if (!buf) -fatal ("Couldn't find %d bytes to expand device tree\n\r" , size); +die ("Couldn't find %d bytes to expand device tree\n\r" , size); rc =fdt_open_into (fdt, buf, size);if (rc !=0 ) -fatal ("Couldn't expand fdt into new buffer: %s\n\r" , +die ("Couldn't expand fdt into new buffer: %s\n\r" ,fdt_strerror (rc)); fdt = buf;
@@ -159,7 +159,7 @@ static unsigned long fdt_wrapper_finalize(void) rc =fdt_pack (fdt);if (rc !=0 ) -fatal ("Couldn't pack flat tree: %s\n\r" , +die ("Couldn't pack flat tree: %s\n\r" ,fdt_strerror (rc));return (unsigned long )fdt; }
@@ -185,5 +185,5 @@ void fdt_init(void *blob) err =fdt_open_into (fdt, fdt, bufsize);if (err !=0 ) -fatal ("fdt_init(): %s\n\r" ,fdt_strerror (err)); +die ("fdt_init(): %s\n\r" ,fdt_strerror (err)); }
kexec/arch/ppc/ops.h +0 -2
@@ -145,6 +145,4 @@ static inline char *get_path(const void *phandle, char *buf, int len) return NULL; } -#define fatal(args...) { printf(args); exit(1); } -#endif /* _PPC_BOOT_OPS_H_ */
Signature · 6 lines
1.7.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedQuoted 6 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
fatal()nearly does the same thing asdie()does, so this is kind of duplicate. Removefatal()and usedie()instead.Signed-off-by Zhang Yanfei <[email protected]>
Thanks, applied.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec