public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@harddata.com>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk
Subject: Minor "cleanup" patches for 2.4.5-ac kernels
Date: Tue, 12 Jun 2001 18:38:32 -0600	[thread overview]
Message-ID: <20010612183832.A29923@mail.harddata.com> (raw)

Here are some small, but in times important, "gotchas" in current
2.4.5-ac kernels.

When compiling SMP 'udelay' in current drivers/pci/quirks.c expands to:

   __udelay((15), cpu_data[(current->processor)]...

and a type for 'current' is not known, at least on alpha, so
the following seems to be in order:

--- linux-2.4.5ac/drivers/pci/quirks.c~	Tue Jun 12 16:31:12 2001
+++ linux-2.4.5ac/drivers/pci/quirks.c	Tue Jun 12 17:13:18 2001
@@ -18,6 +18,7 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/sched.h>
 
 #undef DEBUG
 
There is no problem if SMP is not configured.

This one is replacing a symbol in sg.c to one which is exported
so 'sg.o' can be compiled as a valid module.

--- linux-2.4.5ac/drivers/scsi/sg.c~	Tue May 29 17:52:09 2001
+++ linux-2.4.5ac/drivers/scsi/sg.c	Tue May 29 18:40:17 2001
@@ -2603,7 +2603,7 @@
     num = (count < 10) ? count : 10;
     copy_from_user(buff, buffer, num);
     buff[num] = '\0';
-    sg_allow_dio = simple_strtol(buff, 0, 10) ? 1 : 0;
+    sg_allow_dio = simple_strtoul(buff, 0, 10) ? 1 : 0;
     return count;
 }
 
 
And this one, proposed already some few times by Ivan Kokshaysky,

--- 2.4.5-ac11/include/linux/binfmts.h	Mon Jun  4 14:19:00 2001
+++ linux/include/linux/binfmts.h	Mon Jun  4 20:24:50 2001
@@ -32,6 +32,9 @@ struct linux_binprm{
 	unsigned long loader, exec;
 };
 
+/* Forward declaration */
+struct mm_struct;
+
 /*
  * This structure defines the functions that are used to load the binary formats that
  * linux accepts.

kills a flood of warnings (at least on Alpha) about 'mm_struct'
defined on a parameter list.

Are there any reasons which would make any of those "bad"?

  Michal

             reply	other threads:[~2001-06-13  0:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-13  0:38 Michal Jaegermann [this message]
2001-06-13  1:03 ` Minor "cleanup" patches for 2.4.5-ac kernels Jeff Garzik
2001-06-13  2:04   ` Michal Jaegermann
2001-06-14 13:40     ` Jeff Garzik
2001-06-14 18:05 ` Alan Cox
2001-06-14 18:30   ` Michal Jaegermann

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=20010612183832.A29923@mail.harddata.com \
    --to=michal@harddata.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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