[PATCH] Random warning fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I compiled 2.6.18-rc7 and I fixed all the warnings I saw.

The patch is attached.

The change I'm not so sure about is the __init additions in ACPI. It
fixes the warnings, but someone who knows better should check it.

Cheers.

--
Felipe Contreras
diff -ur linux-2.6.18-rc7-orig/arch/i386/kernel/cpu/transmeta.c linux-2.6.18-rc7-new/arch/i386/kernel/cpu/transmeta.c
--- linux-2.6.18-rc7-orig/arch/i386/kernel/cpu/transmeta.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/arch/i386/kernel/cpu/transmeta.c	2006-09-13 00:55:48.000000000 -0500
@@ -18,6 +18,7 @@
 	/* Print CMS and CPU revision */
 	max = cpuid_eax(0x80860000);
 	cpu_rev = 0;
+	cpu_freq = 0;
 	if ( max >= 0x80860001 ) {
 		cpuid(0x80860001, &dummy, &cpu_rev, &cpu_freq, &cpu_flags); 
 		if (cpu_rev != 0x02000000) {
diff -ur linux-2.6.18-rc7-orig/arch/i386/kernel/mpparse.c linux-2.6.18-rc7-new/arch/i386/kernel/mpparse.c
--- linux-2.6.18-rc7-orig/arch/i386/kernel/mpparse.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/arch/i386/kernel/mpparse.c	2006-09-13 02:24:18.000000000 -0500
@@ -228,12 +228,14 @@
 
 	mpc_oem_bus_info(m, str, translation_table[mpc_record]);
 
+#if MAX_MP_BUSSES < 256
 	if (m->mpc_busid >= MAX_MP_BUSSES) {
 		printk(KERN_WARNING "MP table busid value (%d) for bustype %s "
 			" is too large, max. supported is %d\n",
 			m->mpc_busid, str, MAX_MP_BUSSES - 1);
 		return;
 	}
+#endif
 
 	if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) {
 		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
diff -ur linux-2.6.18-rc7-orig/drivers/acpi/processor_core.c linux-2.6.18-rc7-new/drivers/acpi/processor_core.c
--- linux-2.6.18-rc7-orig/drivers/acpi/processor_core.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/drivers/acpi/processor_core.c	2006-09-13 02:15:08.000000000 -0500
@@ -519,7 +519,7 @@
 
 static void *processor_device_array[NR_CPUS];
 
-static int acpi_processor_start(struct acpi_device *device)
+static __init int acpi_processor_start(struct acpi_device *device)
 {
 	int result = 0;
 	acpi_status status = AE_OK;
diff -ur linux-2.6.18-rc7-orig/drivers/acpi/processor_idle.c linux-2.6.18-rc7-new/drivers/acpi/processor_idle.c
--- linux-2.6.18-rc7-orig/drivers/acpi/processor_idle.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/drivers/acpi/processor_idle.c	2006-09-13 02:14:22.000000000 -0500
@@ -1077,7 +1077,7 @@
 	.release = single_release,
 };
 
-int acpi_processor_power_init(struct acpi_processor *pr,
+int __init acpi_processor_power_init(struct acpi_processor *pr,
 			      struct acpi_device *device)
 {
 	acpi_status status = 0;
diff -ur linux-2.6.18-rc7-orig/fs/bio.c linux-2.6.18-rc7-new/fs/bio.c
--- linux-2.6.18-rc7-orig/fs/bio.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/fs/bio.c	2006-09-13 01:22:19.000000000 -0500
@@ -166,7 +166,7 @@
 
 		bio_init(bio);
 		if (likely(nr_iovecs)) {
-			unsigned long idx;
+			unsigned long idx = 0;
 
 			bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
 			if (unlikely(!bvl)) {
diff -ur linux-2.6.18-rc7-orig/ipc/msg.c linux-2.6.18-rc7-new/ipc/msg.c
--- linux-2.6.18-rc7-orig/ipc/msg.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/ipc/msg.c	2006-09-13 01:34:46.000000000 -0500
@@ -345,6 +345,8 @@
 	if (msqid < 0 || cmd < 0)
 		return -EINVAL;
 
+	setbuf.qbytes = setbuf.uid = setbuf.gid = setbuf.mode = 0;
+
 	version = ipc_parse_version(&cmd);
 
 	switch (cmd) {
diff -ur linux-2.6.18-rc7-orig/ipc/sem.c linux-2.6.18-rc7-new/ipc/sem.c
--- linux-2.6.18-rc7-orig/ipc/sem.c	2006-08-06 13:20:11.000000000 -0500
+++ linux-2.6.18-rc7-new/ipc/sem.c	2006-09-13 01:35:56.000000000 -0500
@@ -809,6 +809,8 @@
 	struct sem_setbuf setbuf;
 	struct kern_ipc_perm *ipcp;
 
+	setbuf.uid = setbuf.gid = setbuf.mode = 0;
+
 	if(cmd == IPC_SET) {
 		if(copy_semid_from_user (&setbuf, arg.buf, version))
 			return -EFAULT;

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux