public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.5.9 patch] Fix bluesmoke/mce compiler warnings.
@ 2002-04-19 10:18 Anton Altaparmakov
  2002-04-19 13:00 ` Dave Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Anton Altaparmakov @ 2002-04-19 10:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel

Linus,

Please consider below patch for inclusion. It fixes compiler warnings
from arch/i386/kernel/bluesmoke.c which appear due to smp_call_function
expecting a function pointer taking an argument to a void * but
mce_checkregs takes an int argument...

This patch changes mce_checkregs to use void* and typecasts to/from
unsigned long as necessary.

Patch is tested and compilation of bluesmoke.c now proceeds without
warnings on both UP and SMP.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.openprojects.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

--- mce.patch ---
--- tng/arch/i386/kernel/bluesmoke.c.old	Fri Apr 19 10:54:21 2002
+++ tng/arch/i386/kernel/bluesmoke.c	Fri Apr 19 10:53:04 2002
@@ -227,12 +227,12 @@ asmlinkage void do_machine_check(struct 
 #ifdef CONFIG_X86_MCE_NONFATAL
 struct timer_list mce_timer;
 
-static void mce_checkregs (unsigned int cpu)
+static void mce_checkregs (void *cpu)
 {
 	u32 low, high;
 	int i;
 
-	if (cpu!=smp_processor_id())
+	if ((unsigned long)cpu!=smp_processor_id())
 		BUG();
 
 	for (i=0; i<banks; i++) {
@@ -258,13 +258,13 @@ static void mce_checkregs (unsigned int 
 
 static void mce_timerfunc (unsigned long data)
 {
-	int i;
+	unsigned long i;
 
-	for (i=0; i<smp_num_cpus; i++) {
+	for (i = 0; i < smp_num_cpus; i++) {
 		if (i == smp_processor_id())
-			mce_checkregs(i);
+			mce_checkregs((void*)i);
 		else
-			smp_call_function (mce_checkregs, i, 1, 1);
+			smp_call_function(mce_checkregs, (void*)i, 1, 1);
 	}
 }
 #endif



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-19 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-19 10:18 [2.5.9 patch] Fix bluesmoke/mce compiler warnings Anton Altaparmakov
2002-04-19 13:00 ` Dave Jones
2002-04-19 14:16   ` Anton Altaparmakov
2002-04-19 14:35     ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox