LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alon Bar-Lev <alon.barlev@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@osdl.org, bwalle@suse.de,
	rmk+lkml@arm.linux.org.uk
Subject: [PATCH 24/34] __initdata cleanup - init
Date: Fri, 9 Feb 2007 17:28:09 +0200	[thread overview]
Message-ID: <200702091728.09205.alon.barlev@gmail.com> (raw)
In-Reply-To: <200702091711.34441.alon.barlev@gmail.com>


Trivial.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Bernhard Walle <bwalle@suse.de>

---

diff -urNp linux-2.6.20-rc6-mm3.org/init/do_mounts.c linux-2.6.20-rc6-mm3/init/do_mounts.c
--- linux-2.6.20-rc6-mm3.org/init/do_mounts.c	2007-01-25 04:19:28.000000000 +0200
+++ linux-2.6.20-rc6-mm3/init/do_mounts.c	2007-01-31 22:19:30.000000000 +0200
@@ -18,11 +18,11 @@
 
 extern int get_filesystem_list(char * buf);
 
-int __initdata rd_doload;	/* 1 = load RAM disk, 0 = don't load */
+int __initdata rd_doload = 0;	/* 1 = load RAM disk, 0 = don't load */
 
 int root_mountflags = MS_RDONLY | MS_SILENT;
-char * __initdata root_device_name;
-static char __initdata saved_root_name[64];
+char * __initdata root_device_name = NULL;
+static char __initdata saved_root_name[64] = "";
 
 dev_t ROOT_DEV;
 
@@ -214,21 +214,21 @@ static int __init root_dev_setup(char *l
 
 __setup("root=", root_dev_setup);
 
-static char * __initdata root_mount_data;
+static char * __initdata root_mount_data = NULL;
 static int __init root_data_setup(char *str)
 {
 	root_mount_data = str;
 	return 1;
 }
 
-static char * __initdata root_fs_names;
+static char * __initdata root_fs_names = NULL;
 static int __init fs_names_setup(char *str)
 {
 	root_fs_names = str;
 	return 1;
 }
 
-static unsigned int __initdata root_delay;
+static unsigned int __initdata root_delay = 0;
 static int __init root_delay_setup(char *str)
 {
 	root_delay = simple_strtoul(str, NULL, 0);
diff -urNp linux-2.6.20-rc6-mm3.org/init/do_mounts_initrd.c linux-2.6.20-rc6-mm3/init/do_mounts_initrd.c
--- linux-2.6.20-rc6-mm3.org/init/do_mounts_initrd.c	2007-01-25 04:19:28.000000000 +0200
+++ linux-2.6.20-rc6-mm3/init/do_mounts_initrd.c	2007-01-31 22:19:30.000000000 +0200
@@ -13,7 +13,7 @@
 unsigned long initrd_start, initrd_end;
 int initrd_below_start_ok;
 unsigned int real_root_dev;	/* do_proc_dointvec cannot handle kdev_t */
-static int __initdata old_fd, root_fd;
+static int __initdata old_fd = 0, root_fd = 0;
 static int __initdata mount_initrd = 1;
 
 static int __init no_initrd(char *str)
diff -urNp linux-2.6.20-rc6-mm3.org/init/do_mounts_md.c linux-2.6.20-rc6-mm3/init/do_mounts_md.c
--- linux-2.6.20-rc6-mm3.org/init/do_mounts_md.c	2007-01-25 04:19:28.000000000 +0200
+++ linux-2.6.20-rc6-mm3/init/do_mounts_md.c	2007-01-31 22:19:30.000000000 +0200
@@ -12,7 +12,7 @@
  * The code for that is here.
  */
 
-static int __initdata raid_noautodetect, raid_autopart;
+static int __initdata raid_noautodetect = 0, raid_autopart = 0;
 
 static struct {
 	int minor;
@@ -20,9 +20,9 @@ static struct {
 	int level;
 	int chunk;
 	char *device_names;
-} md_setup_args[256] __initdata;
+} md_setup_args[256] __initdata = {{0}};
 
-static int md_setup_ents __initdata;
+static int md_setup_ents __initdata = 0;
 
 extern int mdp_major;
 /*
diff -urNp linux-2.6.20-rc6-mm3.org/init/initramfs.c linux-2.6.20-rc6-mm3/init/initramfs.c
--- linux-2.6.20-rc6-mm3.org/init/initramfs.c	2007-01-31 22:15:41.000000000 +0200
+++ linux-2.6.20-rc6-mm3/init/initramfs.c	2007-01-31 22:19:30.000000000 +0200
@@ -7,7 +7,7 @@
 #include <linux/string.h>
 #include <linux/syscalls.h>
 
-static __initdata char *message;
+static __initdata char *message = NULL;
 static void __init error(char *x)
 {
 	if (!message)
@@ -33,7 +33,7 @@ static __initdata struct hash {
 	mode_t mode;
 	struct hash *next;
 	char name[N_ALIGN(PATH_MAX)];
-} *head[32];
+} *head[32] = {0};
 
 static inline int hash(int major, int minor, int ino)
 {
@@ -84,12 +84,12 @@ static void __init free_hash(void)
 
 /* cpio header parsing */
 
-static __initdata unsigned long ino, major, minor, nlink;
-static __initdata mode_t mode;
-static __initdata unsigned long body_len, name_len;
-static __initdata uid_t uid;
-static __initdata gid_t gid;
-static __initdata unsigned rdev;
+static __initdata unsigned long ino = 0l, major = 0l, minor = 0l, nlink = 0l;
+static __initdata mode_t mode = 0;
+static __initdata unsigned long body_len = 0l, name_len = 0l;
+static __initdata uid_t uid = 0;
+static __initdata gid_t gid = 0;
+static __initdata unsigned rdev = 0;
 
 static void __init parse_header(char *s)
 {
@@ -125,13 +125,13 @@ static __initdata enum state {
 	CopyFile,
 	GotSymlink,
 	Reset
-} state, next_state;
+} state = Start, next_state = Start;
 
-static __initdata char *victim;
-static __initdata unsigned count;
-static __initdata loff_t this_header, next_header;
+static __initdata char *victim = NULL;
+static __initdata unsigned count = 0;
+static __initdata loff_t this_header = 0, next_header = 0;
 
-static __initdata int dry_run;
+static __initdata int dry_run = 0;
 
 static inline void eat(unsigned n)
 {
@@ -140,9 +140,9 @@ static inline void eat(unsigned n)
 	count -= n;
 }
 
-static __initdata char *collected;
-static __initdata int remains;
-static __initdata char *collect;
+static __initdata char *collected = NULL;
+static __initdata int remains = 0;
+static __initdata char *collect = NULL;
 
 static void __init read_into(char *buf, unsigned size, enum state next)
 {
@@ -158,7 +158,7 @@ static void __init read_into(char *buf, 
 	}
 }
 
-static __initdata char *header_buf, *symlink_buf, *name_buf;
+static __initdata char *header_buf = NULL, *symlink_buf = NULL, *name_buf = NULL;
 
 static int __init do_start(void)
 {
@@ -257,7 +257,7 @@ static void __init clean_path(char *path
 	}
 }
 
-static __initdata int wfd;
+static __initdata int wfd = 0;
 
 static int __init do_name(void)
 {
@@ -491,7 +491,7 @@ static char * __init unpack_to_rootfs(ch
 	return message;
 }
 
-static int __initdata do_retain_initrd;
+static int __initdata do_retain_initrd = 0;
 
 static int __init retain_initrd_param(char *str)
 {
diff -urNp linux-2.6.20-rc6-mm3.org/init/main.c linux-2.6.20-rc6-mm3/init/main.c
--- linux-2.6.20-rc6-mm3.org/init/main.c	2007-01-31 22:15:41.000000000 +0200
+++ linux-2.6.20-rc6-mm3/init/main.c	2007-01-31 22:19:30.000000000 +0200
@@ -122,7 +122,7 @@ void (*late_time_init)(void);
 extern void softirq_init(void);
 
 /* Untouched command line saved by arch-specific code. */
-char __initdata boot_command_line[COMMAND_LINE_SIZE];
+char __initdata boot_command_line[COMMAND_LINE_SIZE] = "";
 /* Untouched saved command line (eg. for /proc) */
 char *saved_command_line;
 /* Command line for parameter parsing */
@@ -470,7 +470,7 @@ static int __init do_early_param(char *p
 void __init parse_early_param(void)
 {
 	static __initdata int done = 0;
-	static __initdata char tmp_cmdline[COMMAND_LINE_SIZE];
+	static __initdata char tmp_cmdline[COMMAND_LINE_SIZE] = "";
 
 	if (done)
 		return;
@@ -640,7 +640,7 @@ asmlinkage void __init start_kernel(void
 	rest_init();
 }
 
-static int __initdata initcall_debug;
+static int __initdata initcall_debug = 0;
 
 static int __init initcall_debug_setup(char *str)
 {

  parent reply	other threads:[~2007-02-09 15:35 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200702091711.34441.alon.barlev@gmail.com>
2007-02-09 15:13 ` [PATCH 01/34] __initdata cleanup - alpha Alon Bar-Lev
2007-02-09 16:47   ` Jiri Slaby
2007-02-09 16:52     ` Alon Bar-Lev
2007-02-09 17:11       ` Jiri Slaby
2007-02-09 15:13 ` [PATCH 02/34] __initdata cleanup - arm Alon Bar-Lev
2007-02-09 15:14 ` [PATCH 03/34] __initdata cleanup - avr32 Alon Bar-Lev
2007-02-09 15:15 ` [PATCH 04/34] __initdata cleanup - frv Alon Bar-Lev
2007-02-09 15:15 ` [PATCH 05/34] __initdata cleanup - h8300 Alon Bar-Lev
2007-02-09 15:16 ` [PATCH 06/34] __initdata cleanup - i386 Alon Bar-Lev
2007-02-09 15:17 ` [PATCH 07/34] __initdata cleanup - ia64 Alon Bar-Lev
2007-02-09 15:18 ` [PATCH 08/34] __initdata cleanup - m32r Alon Bar-Lev
2007-02-09 15:19 ` [PATCH 09/34] __initdata cleanup - m68knommu Alon Bar-Lev
2007-02-09 15:19 ` [PATCH 10/34] __initdata cleanup - mips Alon Bar-Lev
2007-02-09 15:20 ` [PATCH 11/34] __initdata cleanup - parisc Alon Bar-Lev
2007-02-09 15:21 ` [PATCH 12/34] __initdata cleanup - powerpc Alon Bar-Lev
2007-02-09 15:21 ` [PATCH 13/34] __initdata cleanup - ppc Alon Bar-Lev
2007-02-09 15:22 ` [PATCH 14/34] __initdata cleanup - s390 Alon Bar-Lev
2007-02-09 15:22 ` [PATCH 15/34] __initdata cleanup - sh Alon Bar-Lev
2007-02-09 15:23 ` [PATCH 16/34] __initdata cleanup - sparc64 Alon Bar-Lev
2007-02-09 15:23 ` [PATCH 17/34] __initdata cleanup - v850 Alon Bar-Lev
2007-02-09 15:24 ` [PATCH 18/34] __initdata cleanup - x86_64 Alon Bar-Lev
2007-02-09 19:35   ` Andi Kleen
2007-02-09 19:45     ` Bernhard Walle
2007-02-09 15:24 ` [PATCH 19/34] __initdata cleanup - xtensa Alon Bar-Lev
2007-02-09 15:25 ` [PATCH 20/34] __initdata cleanup - acpi Alon Bar-Lev
2007-02-09 15:25 ` [PATCH 21/34] __initdata cleanup - aes Alon Bar-Lev
2007-02-09 15:26 ` [PATCH 22/34] __initdata cleanup - fs Alon Bar-Lev
2007-02-09 15:27 ` [PATCH 23/34] __initdata cleanup - ide Alon Bar-Lev
2007-02-09 15:28 ` Alon Bar-Lev [this message]
2007-02-09 15:30 ` [PATCH 25/34] __initdata cleanup - input Alon Bar-Lev
2007-02-09 15:31 ` [PATCH 26/34] __initdata cleanup - intel-rng Alon Bar-Lev
2007-02-09 15:31 ` [PATCH 27/34] __initdata cleanup - mm Alon Bar-Lev
2007-02-09 15:32 ` [PATCH 28/34] __initdata cleanup - mtd Alon Bar-Lev
2007-02-09 15:33 ` [PATCH 29/34] __initdata cleanup - net Alon Bar-Lev
2007-02-09 15:33 ` [PATCH 30/34] __initdata cleanup - parallel Alon Bar-Lev
2007-02-09 15:34 ` [PATCH 31/34] __initdata cleanup - pnp Alon Bar-Lev
2007-02-09 15:34 ` [PATCH 32/34] __initdata cleanup - scsi Alon Bar-Lev
2007-02-09 15:35 ` [PATCH 33/34] __initdata cleanup - serial Alon Bar-Lev
2007-02-09 15:35 ` [PATCH 34/34] __initdata cleanup - video Alon Bar-Lev
2007-02-09 17:00 ` [PATCH 00/34] __initdata cleanup Heiko Carstens
2007-02-09 17:25   ` Alon Bar-Lev
2007-02-09 17:37   ` Roman Zippel
2007-02-09 21:33     ` Andrew Morton
2007-02-09 21:48       ` Alon Bar-Lev
2007-02-09 22:11         ` Andrew Morton

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=200702091728.09205.alon.barlev@gmail.com \
    --to=alon.barlev@gmail.com \
    --cc=akpm@osdl.org \
    --cc=bwalle@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --subject='Re: [PATCH 24/34] __initdata cleanup - init' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).