public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Subject: [PATCH 15/20] inflate: (arch) tidy user declarations
Date: Mon, 31 Oct 2005 14:54:51 -0600	[thread overview]
Message-ID: <16.196662837@selenic.com> (raw)
In-Reply-To: <15.196662837@selenic.com>

inflate: tidy user declarations

Regroup the few remaining gzip-related declarations in users. As the
bulk of the users are now _not_ a collection of routines copied from
gzip, that comment is removed.

Signed-off-by: Matt Mackall <mpm@selenic.com>

Index: 2.6.14/arch/alpha/boot/misc.c
===================================================================
--- 2.6.14.orig/arch/alpha/boot/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/alpha/boot/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,8 +1,5 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
- * adapted for Linux.
  *
  * Modified for ARM Linux by Russell King
  *
@@ -17,28 +14,23 @@
  */
 
 #include <linux/kernel.h>
-
 #include <asm/uaccess.h>
 
 #define puts		srm_printk
 extern long srm_printk(const char *, ...)
      __attribute__ ((format (printf, 1, 2)));
 
-/*
- * gzip delarations
- */
-
+extern int end;
 static char *input_data;
 static int  input_data_size;
-
 static u8 *output_data;
 
-extern int end;
+#define HEAP_SIZE 0x2000
+
+/* gzip delarations */
 static u32 free_mem_ptr;
 static u32 free_mem_ptr_end;
 
-#define HEAP_SIZE 0x2000
-
 #include "../../../lib/inflate.c"
 
 /* flush gunzip output window */
Index: 2.6.14/arch/arm/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/arm/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/arm/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,8 +1,5 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
- * adapted for Linux.
  *
  * Modified for ARM Linux by Russell King
  *
@@ -17,7 +14,6 @@
 unsigned int __machine_arch_type;
 
 #include <linux/string.h>
-
 #include <asm/arch/uncompress.h>
 
 #ifdef STANDALONE_DEBUG
Index: 2.6.14/arch/arm26/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/arm26/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/arm26/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,8 +1,5 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
- * adapted for Linux.
  *
  * Modified for ARM Linux by Russell King
  *
@@ -17,7 +14,6 @@
 unsigned int __machine_arch_type;
 
 #include <linux/kernel.h>
-
 #include <asm/uaccess.h>
 #include "uncompress.h"
 
@@ -25,24 +21,19 @@ unsigned int __machine_arch_type;
 #define puts printf
 #endif
 
-#define __ptr_t void *
-
-/*
- * gzip delarations
- */
-
+extern int end;
 extern char input_data[];
 extern char input_data_end[];
 static u8 *output_data;
 
 static void puts(const char *);
 
-extern int end;
+#define HEAP_SIZE 0x2000
+
+/* gzip delarations */
 static u32 free_mem_ptr;
 static u32 free_mem_ptr_end;
 
-#define HEAP_SIZE 0x2000
-
 #include "../../../../lib/inflate.c"
 
 #ifdef STANDALONE_DEBUG
Index: 2.6.14/arch/cris/arch-v10/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/cris/arch-v10/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/cris/arch-v10/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,14 +1,9 @@
 /*
  * misc.c
  *
- * $Id: misc.c,v 1.6 2003/10/27 08:04:31 starvik Exp $
- * 
- * This is a collection of several routines from gzip-1.0.3 
- * adapted for Linux.
- *
  * puts by Nick Holloway 1993, better puts by Martin Mares 1995
  * adoptation for Linux/CRIS Axis Communications AB, 1999
- * 
+ *
  */
 
 /* where the piggybacked kernel image expects itself to live.
@@ -20,24 +15,17 @@
 #define KERNEL_LOAD_ADR 0x40004000
 
 #include <linux/config.h>
-
 #include <linux/types.h>
 #include <asm/arch/svinto.h>
 
-/*
- * gzip declarations
- */
-
-unsigned compsize; /* compressed size, used by head.S */
-
+extern int end; /* the "heap" is put directly after the BSS ends, at end */
+extern unsigned compsize; /* compressed size, used by head.S */
 extern char *input_data;  /* lives in head.S */
 static u8 *output_data;
 
 static void puts(const char *);
 
-/* the "heap" is put directly after the BSS ends, at end */
-  
-extern int end;
+/* gzip declarations */
 static long free_mem_ptr = (long)&end;
 static long free_mem_end_ptr = 0xffffffff;
 
Index: 2.6.14/arch/cris/arch-v32/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/cris/arch-v32/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/cris/arch-v32/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,11 +1,6 @@
 /*
  * misc.c
  *
- * $Id: misc.c,v 1.8 2005/04/24 18:34:29 starvik Exp $
- *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
  * puts by Nick Holloway 1993, better puts by Martin Mares 1995
  * adoptation for Linux/CRIS Axis Communications AB, 1999
  *
@@ -20,24 +15,18 @@
 #define KERNEL_LOAD_ADR 0x40004000
 
 #include <linux/config.h>
-
 #include <linux/types.h>
 #include <asm/arch/hwregs/reg_rdwr.h>
 #include <asm/arch/hwregs/reg_map.h>
 #include <asm/arch/hwregs/ser_defs.h>
 
-/*
- * gzip declarations
- */
-
+extern int _end; /* the "heap" is put directly after the BSS ends, at end */
 extern char *input_data;  /* lives in head.S */
 static u8 *output_data;
 
 static void puts(const char *);
 
-/* the "heap" is put directly after the BSS ends, at end */
-
-extern int _end;
+/* gzip declarations */
 static long free_mem_ptr = (long)&_end;
 static long free_mem_end_ptr = 0xffffffff;
 
Index: 2.6.14/arch/i386/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/i386/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/i386/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,8 +1,5 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
- * adapted for Linux.
  *
  * puts by Nick Holloway 1993, better puts by Martin Mares 1995
  * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
@@ -15,16 +12,6 @@
 #include <asm/page.h>
 
 /*
- * gzip declarations
- */
-
-/*
- * Why do we do this? Don't ask me..
- *
- * Incomprehensible are the ways of bootloaders.
- */
-
-/*
  * This is set up by the setup-routine at boot-time
  */
 static unsigned char *real_mode; /* Pointer to real-mode data */
@@ -35,6 +22,7 @@ static unsigned char *real_mode; /* Poin
 #endif
 #define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0))
 
+extern int end;
 extern char input_data[];
 extern int input_len;
 static long bytes_out;
@@ -42,10 +30,6 @@ static u8 *output_data;
 
 static void putstr(const char *);
 
-extern int end;
-static long free_mem_ptr = (long)&end;
-static long free_mem_end_ptr;
-
 #define INPLACE_MOVE_ROUTINE  0x1000
 #define LOW_BUFFER_START      0x2000
 #define LOW_BUFFER_MAX       0x90000
@@ -62,6 +46,10 @@ static int lines, cols;
 static void * xquad_portio = NULL;
 #endif
 
+/* gzip declarations */
+static long free_mem_ptr = (long)&end;
+static long free_mem_end_ptr;
+
 #include "../../../../lib/inflate.c"
 
 static void scroll(void)
Index: 2.6.14/arch/m32r/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/m32r/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/m32r/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,9 +1,6 @@
 /*
  * arch/m32r/boot/compressed/misc.c
  *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
  * Adapted for SH by Stuart Menefy, Aug 1999
  *
  * 2003-02-12:	Support M32R by Takeo Takahashi
@@ -13,21 +10,18 @@
 #include <linux/config.h>
 #include <linux/string.h>
 
-/*
- * gzip declarations
- */
-
 static unsigned char *input_data;
 static int input_len;
 static u8 *output_data;
 
 #include "m32r_sio.c"
 
+#define HEAP_SIZE             0x10000
+
+/* gzip declarations */
 static unsigned long free_mem_ptr;
 static unsigned long free_mem_end_ptr;
 
-#define HEAP_SIZE             0x10000
-
 #include "../../../../lib/inflate.c"
 
 /* flush the gunzip output buffer */
Index: 2.6.14/arch/sh/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/sh/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/sh/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,9 +1,6 @@
 /*
  * arch/sh/boot/compressed/misc.c
  *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
  * Adapted for SH by Stuart Menefy, Aug 1999
  *
  * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000
@@ -15,23 +12,20 @@
 #include <asm/sh_bios.h>
 #endif
 
-/*
- * gzip declarations
- */
-
+extern int _text;		/* Defined in vmlinux.lds.S */
+extern int _end;
 extern char input_data[];
 extern int input_len;
 static u8 *output_data;
 
 int puts(const char *);
 
-extern int _text;		/* Defined in vmlinux.lds.S */
-extern int _end;
+#define HEAP_SIZE             0x10000
+
+/* gzip declarations */
 static unsigned long free_mem_ptr;
 static unsigned long free_mem_end_ptr;
 
-#define HEAP_SIZE             0x10000
-
 #include "../../../../lib/inflate.c"
 
 #ifdef CONFIG_SH_STANDARD_BIOS
Index: 2.6.14/arch/sh64/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/sh64/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/sh64/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,9 +1,6 @@
 /*
  * arch/shmedia/boot/compressed/misc.c
  *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
  * Adapted for SHmedia from sh by Stuart Menefy, May 2002
  */
 
@@ -15,23 +12,20 @@
 #define CACHE_DISABLE     1
 int cache_control(unsigned int command);
 
-/*
- * gzip declarations
- */
-
+extern int _text;		/* Defined in vmlinux.lds.S */
+extern int _end;
 extern char input_data[];
 extern int input_len;
 static u8 *output_data;
 
 static void puts(const char *);
 
-extern int _text;		/* Defined in vmlinux.lds.S */
-extern int _end;
+#define HEAP_SIZE             0x10000
+
+/* gzip declarations */
 static unsigned long free_mem_ptr;
 static unsigned long free_mem_end_ptr;
 
-#define HEAP_SIZE             0x10000
-
 #include "../../../../lib/inflate.c"
 
 void puts(const char *s)
Index: 2.6.14/arch/x86_64/boot/compressed/misc.c
===================================================================
--- 2.6.14.orig/arch/x86_64/boot/compressed/misc.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/arch/x86_64/boot/compressed/misc.c	2005-10-28 22:04:25.000000000 -0700
@@ -1,8 +1,5 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
- * adapted for Linux.
  *
  * puts by Nick Holloway 1993, better puts by Martin Mares 1995
  * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
@@ -13,10 +10,6 @@
 #include <asm/page.h>
 
 /*
- * gzip declarations
- */
-
-/*
  * This is set up by the setup-routine at boot-time
  */
 static unsigned char *real_mode; /* Pointer to real-mode data */
@@ -29,16 +22,11 @@ static unsigned char *real_mode; /* Poin
 
 extern unsigned char input_data[];
 extern int input_len;
-
+extern int end;
 static long bytes_out;
 static u8 *output_data;
-
 static void putstr(const char *);
 
-extern int end;
-static long free_mem_ptr = (long)&end;
-static long free_mem_end_ptr;
-
 #define INPLACE_MOVE_ROUTINE  0x1000
 #define LOW_BUFFER_START      0x2000
 #define LOW_BUFFER_MAX       0x90000
@@ -51,6 +39,10 @@ static char *vidmem = (char *)0xb8000;
 static int vidport;
 static int lines, cols;
 
+/* gzip declarations */
+static long free_mem_ptr = (long)&end;
+static long free_mem_end_ptr;
+
 #include "../../../../lib/inflate.c"
 
 static void scroll(void)
Index: 2.6.14/init/do_mounts_rd.c
===================================================================
--- 2.6.14.orig/init/do_mounts_rd.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/init/do_mounts_rd.c	2005-10-28 22:04:25.000000000 -0700
@@ -269,9 +269,11 @@ int __init rd_load_disk(int n)
 
 #ifdef BUILD_CRAMDISK
 
-/*
- * gzip declarations
- */
+/* gzip declarations */
+#define INIT __init
+#define NO_INFLATE_MALLOC
+
+#include "../lib/inflate.c"
 
 #define INBUFSIZ 4096
 static u8 *inbuf;
@@ -279,12 +281,6 @@ static int exit_code;
 static int unzip_error;
 static int crd_infd, crd_outfd;
 
-#define INIT __init
-
-#define NO_INFLATE_MALLOC
-
-#include "../lib/inflate.c"
-
 static void __init error(const char *x)
 {
 	printk(KERN_ERR "%s\n", x);
Index: 2.6.14/init/initramfs.c
===================================================================
--- 2.6.14.orig/init/initramfs.c	2005-10-28 22:04:23.000000000 -0700
+++ 2.6.14/init/initramfs.c	2005-10-28 22:04:25.000000000 -0700
@@ -329,12 +329,9 @@ static void __init flush_buffer(const u8
 	}
 }
 
-/*
- * gzip declarations
- */
+/* gzip declarations */
 
 #define INIT __init
-
 #define NO_INFLATE_MALLOC
 
 #include "../lib/inflate.c"

  reply	other threads:[~2005-10-31 21:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 20:54 [PATCH 1/20] inflate: lindent and manual formatting changes Matt Mackall
2005-10-31 20:54 ` [PATCH 2/20] inflate: kill legacy bits Matt Mackall
2005-10-31 20:54   ` [PATCH 3/20] inflate: clean up input logic Matt Mackall
2005-10-31 20:54     ` [PATCH 4/20] inflate: start moving globals into iostate Matt Mackall
2005-10-31 20:54       ` [PATCH 5/20] inflate: cleanup Huffman table code Matt Mackall
2005-10-31 20:54         ` [PATCH 6/20] inflate: internalize CRC calculation, cleanup table calculation Matt Mackall
2005-10-31 20:54           ` [PATCH 7/20] inflate: eliminate memzero usage Matt Mackall
2005-10-31 20:54             ` [PATCH 8/20] inflate: (arch) kill unneeded declarations Matt Mackall
2005-10-31 20:54               ` [PATCH 9/20] inflate: (arch) refactor inflate malloc code Matt Mackall
2005-10-31 20:54                 ` [PATCH 10/20] inflate: (arch) kill external CRC calculation Matt Mackall
2005-10-31 20:54                   ` [PATCH 11/20] inflate: (arch) kill get_byte Matt Mackall
2005-10-31 20:54                     ` [PATCH 12/20] inflate: internalize (arch) most of the output window handling Matt Mackall
2005-10-31 20:54                       ` [PATCH 13/20] inflate: (arch) kill silly zlib typedefs Matt Mackall
2005-10-31 20:54                         ` [PATCH 14/20] inflate: (arch) use an error callback rather than a global Matt Mackall
2005-10-31 20:54                           ` Matt Mackall [this message]
2005-10-31 20:54                             ` [PATCH 16/20] inflate: remove legacy DEBG macros Matt Mackall
2005-10-31 20:54                               ` [PATCH 17/20] inflate: mark some arrays as initdata Matt Mackall
2005-10-31 20:54                                 ` [PATCH 18/20] inflate: minor const changes Matt Mackall
2005-10-31 20:54                                   ` [PATCH 19/20] inflate: (arch) use proper linking Matt Mackall
2005-10-31 20:54                                     ` [PATCH 20/20] inflate: make in-core inflate share common CRC Matt Mackall
2005-10-31 22:45                                     ` [PATCH 19/20] inflate: (arch) use proper linking Russell King
2005-10-31 23:02                                       ` Matt Mackall
2005-10-31 23:13                                         ` Russell King
2005-10-31 22:43                                 ` [PATCH 17/20] inflate: mark some arrays as initdata Russell King
2005-10-31 22:57                                   ` Matt Mackall
2005-10-31 23:10                                     ` Russell King
2005-10-31 23:11                                       ` Matt Mackall
2005-10-31 23:36                                         ` Russell King
2005-10-31 21:05                         ` [PATCH 13/20] inflate: (arch) kill silly zlib typedefs Geert Uytterhoeven
2005-10-31 21:14                           ` Matt Mackall
2005-11-01  6:53                             ` Willy Tarreau
2005-11-01  7:50                               ` Geert Uytterhoeven
2005-11-01  8:57                                 ` Willy Tarreau
2005-11-01 11:27                                   ` Geert Uytterhoeven
2005-11-08  6:05                                   ` Miles Bader
2005-11-08  6:18                                     ` Willy Tarreau
2005-11-01  0:24 ` [PATCH 1/20] inflate: lindent and manual formatting changes Paul Mackerras
2005-11-01  1:39   ` Matt Mackall
2005-11-01  7:50     ` Rob Landley
2005-11-01 18:28 ` Oops! Forgot [PATCH 0/20] inflate cleanups Matt Mackall
  -- strict thread matches above, loose matches on Subject: below --
2005-12-22 18:26 [PATCH 14/20] inflate: (arch) use an error callback rather than a global Matt Mackall
2005-12-22 18:26 ` [PATCH 15/20] inflate: (arch) tidy user declarations Matt Mackall

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=16.196662837@selenic.com \
    --to=mpm@selenic.com \
    --cc=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.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