2001-11-22 11:53:39

by jurriaan

[permalink] [raw]
Subject: SYM2 driver: warnings about linux/malloc.h in 2.4.15-pre9

make[3]: Entering directory `/usr/src/linux-2.4.15pre9/drivers/scsi/sym53c8xx_2'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.15pre9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-al
iasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -I. -c -o sym_fw.o sym_fw.c
In file included from sym_glue.h:80,
from sym_fw.c:56:
/usr/src/linux-2.4.15pre9/include/linux/malloc.h:4: warning: #warning linux/malloc.h is deprecated, use linux/slab.h instead.

there's more of these, and they may have been in earlier kernels as
well. This is when compiling on an Alpha, btw.

Good luck,
Jurriaan
--
"Oh", he said finally.
"And what's that supposed to mean?"
"It means he's thinking", said the unicorn. "Always a bad sign."
Simon R Green - Blue Moon Rising
GNU/Linux 2.4.15-pre7 on Debian/Alpha 64-bits 988 bogomips load:0.13 0.24 0.24


2001-11-22 12:45:31

by Adrian Bunk

[permalink] [raw]
Subject: [patch] 2.4.15-pre9: s|linux/malloc.h|linux/slab.h|

On Thu, 22 Nov 2001, Jurriaan on Alpha wrote:

> make[3]: Entering directory `/usr/src/linux-2.4.15pre9/drivers/scsi/sym53c8xx_2'
> gcc -D__KERNEL__ -I/usr/src/linux-2.4.15pre9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-al
> iasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -I. -c -o sym_fw.o sym_fw.c
> In file included from sym_glue.h:80,
> from sym_fw.c:56:
> /usr/src/linux-2.4.15pre9/include/linux/malloc.h:4: warning: #warning linux/malloc.h is deprecated, use linux/slab.h instead.
>...


This warning is harmless. The patch below fixes the warning in this file
and in two other files:


--- drivers/scsi/sym53c8xx_2/sym_glue.h.old Thu Nov 22 13:01:19 2001
+++ drivers/scsi/sym53c8xx_2/sym_glue.h Thu Nov 22 13:02:41 2001
@@ -77,7 +77,7 @@
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/string.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/time.h>
--- drivers/s390/s390io.c.old Thu Nov 22 13:07:11 2001
+++ drivers/s390/s390io.c Thu Nov 22 13:07:33 2001
@@ -33,7 +33,7 @@
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/string.h>
#include <linux/smp.h>
#include <linux/threads.h>
--- arch/arm/mach-epxa10db/dma.c.old Thu Nov 22 13:39:23 2001
+++ arch/arm/mach-epxa10db/dma.c Thu Nov 22 13:39:33 2001
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/sched.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/mman.h>
#include <linux/init.h>


cu
Adrian

--

Get my GPG key: finger [email protected] | gpg --import

Fingerprint: B29C E71E FE19 6755 5C8A 84D4 99FC EA98 4F12 B400