mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Altaparmakov <aia21@cantab.net>
To: torvalds@transmeta.com (Linus Torvalds)
Cc: linux-kernel@vger.kernel.org (Linux Kernel)
Subject: [2.5.9 patch] Fix bluesmoke/mce compiler warnings.
Date: Fri, 19 Apr 2002 11:18:05 +0100 (BST)	[thread overview]
Message-ID: <E16yVSw-0001Iv-00@storm.christs.cam.ac.uk> (raw)

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



             reply	other threads:[~2002-04-19 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-19 10:18 Anton Altaparmakov [this message]
2002-04-19 13:00 ` Dave Jones
2002-04-19 14:16   ` Anton Altaparmakov
2002-04-19 14:35     ` Dave Jones

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=E16yVSw-0001Iv-00@storm.christs.cam.ac.uk \
    --to=aia21@cantab.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®