lkml.org 
[lkml]   [2002]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[2.5.9 patch] Fix bluesmoke/mce compiler warnings.
Date
From
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.034 / U:1.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site