From patchwork Thu Apr 28 22:50:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 1228 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:50:21 -0000 Delivered-To: patches@linaro.org Received: by 10.224.2.73 with SMTP id 9cs165922qai; Thu, 28 Apr 2011 15:50:53 -0700 (PDT) Received: by 10.52.89.49 with SMTP id bl17mr3395230vdb.207.1304031049690; Thu, 28 Apr 2011 15:50:49 -0700 (PDT) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx.google.com with ESMTP id e8si3612947vby.53.2011.04.28.15.50.49; Thu, 28 Apr 2011 15:50:49 -0700 (PDT) Received-SPF: neutral (google.com: 24.201.245.36 is neither permitted nor denied by best guess record for domain of nico@fluxnic.net) client-ip=24.201.245.36; Authentication-Results: mx.google.com; spf=neutral (google.com: 24.201.245.36 is neither permitted nor denied by best guess record for domain of nico@fluxnic.net) smtp.mail=nico@fluxnic.net Content-transfer-encoding: 7BIT Received: from xanadu.home ([66.130.28.92]) by VL-MR-MRZ22.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTP id <0LKD00G7HWSMR9A0@VL-MR-MRZ22.ip.videotron.ca> for patches@linaro.org; Thu, 28 Apr 2011 18:50:48 -0400 (EDT) From: Nicolas Pitre To: Russell King - ARM Linux Cc: linux-arm-kernel@lists.infradead.org, Tony Lindgren , patches@linaro.org Subject: [PATCH 6/9] ARM: zImage: simplify decompress_kernel() Date: Thu, 28 Apr 2011 18:50:21 -0400 Message-id: <1304031024-5121-7-git-send-email-nico@fluxnic.net> X-Mailer: git-send-email 1.7.4 In-reply-to: <1304031024-5121-1-git-send-email-nico@fluxnic.net> References: <1304031024-5121-1-git-send-email-nico@fluxnic.net> From: Nicolas Pitre The return value for decompress_kernel() is no longer used. Furthermore, this was obtained and stored in a variable called output_ptr which is a complete misnomer for what is actually the size of the decompressed kernel image. Let's get rid of it. Signed-off-by: Nicolas Pitre Tested-by: Shawn Guo Tested-by: Tony Lindgren --- arch/arm/boot/compressed/misc.c | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 4657e87..51b87b5 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -26,8 +26,6 @@ unsigned int __machine_arch_type; #include #include -#include - static void putstr(const char *ptr); extern void error(char *x); @@ -149,13 +147,12 @@ void *memcpy(void *__dest, __const void *__src, size_t __n) } /* - * gzip delarations + * gzip declarations */ extern char input_data[]; extern char input_data_end[]; unsigned char *output_data; -unsigned long output_ptr; unsigned long free_mem_ptr; unsigned long free_mem_end_ptr; @@ -183,13 +180,11 @@ asmlinkage void __div0(void) extern void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); -unsigned long +void decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, unsigned long free_mem_ptr_end_p, int arch_id) { - unsigned char *tmp; - output_data = (unsigned char *)output_start; free_mem_ptr = free_mem_ptr_p; free_mem_end_ptr = free_mem_ptr_end_p; @@ -197,12 +192,8 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, arch_decomp_setup(); - tmp = (unsigned char *) (((unsigned long)input_data_end) - 4); - output_ptr = get_unaligned_le32(tmp); - putstr("Uncompressing Linux..."); do_decompress(input_data, input_data_end - input_data, output_data, error); putstr(" done, booting the kernel.\n"); - return output_ptr; }