Skip to contentSkip to conversation

SYM2 driver: warnings about linux/malloc.h in 2.4.15-pre9

PATCH New Jurriaan on Alpha 2 participants 2 messages Nov 22, 2001

lore
Share & tools
lore
#0 lore raw

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

Signature · 5 lines
"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
#1 lore raw

PATCH 1/1 2.4.15-pre9: s|linux/malloc.h|linux/slab.h|

Quoted 7 lines · Jurriaan on Alpha

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:

scsi/sym53c8xx_2/sym_glue.h renamed from scsi/sym53c8xx_2/sym_glue.h.old +1 -1
@@ -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>
s390/s390io.c renamed from s390/s390io.c.old +1 -1
@@ -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>
arm/mach-epxa10db/dma.c renamed from arm/mach-epxa10db/dma.c.old +1 -1
@@ -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

Signature · 3 lines
Get my GPG key: finger [email protected] | gpg --import

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