2001-11-22 13:49:46

by Morten Helgesen

[permalink] [raw]
Subject: [PATCH] remove last references to linux/malloc.h

Hey, Linus and the rest of you.

Quite obvious what this does, right ? :) Yep - removes the last 3 references to linux/malloc.h found in 2.4.15-pre9.

Ok people - stop submitting patches which include malloc.h. Include slab.h instead. :)

== Morten

--
mvh
Morten Helgesen
UNIX System Administrator & C Developer
Nextframe AS
[email protected] / 93445641
http://www.nextframe.net


diff -ur vanilla-2.4.15-pre9/arch/arm/mach-epxa10db/dma.c patched-2.4.15-pre9/arch/arm/mach-epxa10db/dma.c
--- vanilla-2.4.15-pre9/arch/arm/mach-epxa10db/dma.c Thu Oct 25 22:53:45 2001
+++ patched-2.4.15-pre9/arch/arm/mach-epxa10db/dma.c Thu Nov 22 14:06:20 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>

diff -ur vanilla-2.4.15-pre9/drivers/s390/s390io.c patched-2.4.15-pre9/drivers/s390/s390io.c
--- vanilla-2.4.15-pre9/drivers/s390/s390io.c Sun Sep 30 21:26:07 2001
+++ patched-2.4.15-pre9/drivers/s390/s390io.c Thu Nov 22 14:08:51 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>
diff -ur vanilla-2.4.15-pre9/drivers/scsi/sym53c8xx_2/sym_glue.h patched-2.4.15-pre9/drivers/scsi/sym53c8xx_2/sym_glue.h
--- vanilla-2.4.15-pre9/drivers/scsi/sym53c8xx_2/sym_glue.h Thu Nov 22 14:13:59 2001
+++ patched-2.4.15-pre9/drivers/scsi/sym53c8xx_2/sym_glue.h Thu Nov 22 14:07:21 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>






2001-11-22 14:01:48

by Morten Helgesen

[permalink] [raw]
Subject: Re: [PATCH] remove last references to linux/malloc.h

Hey David.

I see your point - but someone has obiously decided to switch from malloc.h to slab.h, and I do not
see the point in having three references to malloc.h when malloc.h only prints a warning and then includes
slab.h

== Morten


On Thu, Nov 22, 2001 at 01:54:29PM +0000, David Woodhouse wrote:
>
>
> [email protected] said:
> > Ok people - stop submitting patches which include malloc.h. Include
> > slab.h instead. :)
>
> Bah. I was sort of hoping we'd come to our collective senses and switch
> them all back.
>
> What does malloc.h do? Stuff to do with memory allocation, one presumes.
> What does slab.h do? Some random implementation detail that people have no
> business knowing about.
>
> --
> dwmw2
>
>

--
mvh
Morten Helgesen
UNIX System Administrator & C Developer
Nextframe AS
[email protected] / 93445641
http://www.nextframe.net

2001-11-24 04:00:11

by Randy.Dunlap

[permalink] [raw]
Subject: Re: [PATCH] remove last references to linux/malloc.h

Morten Helgesen wrote:
>
> Hey David.
>
> I see your point - but someone has obiously decided to switch from malloc.h to slab.h, and I do not
> see the point in having three references to malloc.h when malloc.h only prints a warning and then includes
> slab.h
>
> == Morten
>
> On Thu, Nov 22, 2001 at 01:54:29PM +0000, David Woodhouse wrote:
> >
> >
> > [email protected] said:
> > > Ok people - stop submitting patches which include malloc.h. Include
> > > slab.h instead. :)
> >
> > Bah. I was sort of hoping we'd come to our collective senses and switch
> > them all back.
> >
> > What does malloc.h do? Stuff to do with memory allocation, one presumes.
> > What does slab.h do? Some random implementation detail that people have no
> > business knowing about.

Too bad someone decided to change. I agree with David.

malloc.h is just too plain obvious, I suppose.
slab.h is only an implementation detail.

~Randy

2001-11-24 15:56:49

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] remove last references to linux/malloc.h

"Randy.Dunlap" wrote:
>
> Morten Helgesen wrote:
> >
> > Hey David.
> >
> > I see your point - but someone has obiously decided to switch from malloc.h to slab.h, and I do not
> > see the point in having three references to malloc.h when malloc.h only prints a warning and then includes
> > slab.h
> >
> > == Morten
> >
> > On Thu, Nov 22, 2001 at 01:54:29PM +0000, David Woodhouse wrote:
> > >
> > >
> > > [email protected] said:
> > > > Ok people - stop submitting patches which include malloc.h. Include
> > > > slab.h instead. :)
> > >
> > > Bah. I was sort of hoping we'd come to our collective senses and switch
> > > them all back.
> > >
> > > What does malloc.h do? Stuff to do with memory allocation, one presumes.
> > > What does slab.h do? Some random implementation detail that people have no
> > > business knowing about.
>
> Too bad someone decided to change. I agree with David.
>
> malloc.h is just too plain obvious, I suppose.
> slab.h is only an implementation detail.

Water under the bridge... someone should have spoken up long ago :)
malloc.h has been an empty shell for years and years, and I do not see
how the API benefits from this. Does "malloc" exist in kernel code?
No. kmalloc does... so it's arguably already misnamed as well as
superfluous.

Jeff


--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno