2002-01-30 22:28:50

by David Dyck

[permalink] [raw]
Subject: 2.5.3 missing <linux/malloc.h>


Haven't seen this posted yet, so I'm surprised to report that
several 2.5.3 source files

arch/arm/mach-clps711x/dma.c
drivers/base/core.c
drivers/base/fs.c
drivers/video/neofb.c


try to include linux/malloc.h
but there is no file in the include directory by that name.

I worked around the problem by copying an older linux/malloc.h:

#ifndef _LINUX_MALLOC_H
#define _LINUX_MALLOC_H

#include <linux/slab.h>
#endif /* _LINUX_MALLOC_H */


and I've noticed that many source files have
#include <linux/slab.h> /* kmalloc(), kfree() */
instead of trying to include linux/malloc.h

What's the story/direction the code is taking?



2002-01-30 22:45:10

by Andreas Dilger

[permalink] [raw]
Subject: Re: 2.5.3 missing <linux/malloc.h>

On Jan 30, 2002 14:28 -0800, David Dyck wrote:
> Haven't seen this posted yet, so I'm surprised to report that
> several 2.5.3 source files
>
> arch/arm/mach-clps711x/dma.c
> drivers/base/core.c
> drivers/base/fs.c
> drivers/video/neofb.c
>
>
> try to include linux/malloc.h
> but there is no file in the include directory by that name.
>
> I worked around the problem by copying an older linux/malloc.h:
>
> #ifndef _LINUX_MALLOC_H
> #define _LINUX_MALLOC_H
>
> #include <linux/slab.h>
> #endif /* _LINUX_MALLOC_H */

So, why not just change the above files to include <linux/slab.h>
instead?

> and I've noticed that many source files have
> #include <linux/slab.h> /* kmalloc(), kfree() */
> instead of trying to include linux/malloc.h

That's because they have been updated, and the other ones have not.
Don't ask me _why_ it was changed that way, but it was.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

2002-01-30 22:52:40

by Ben Clifford

[permalink] [raw]
Subject: Re: 2.5.3 missing <linux/malloc.h>

On Wed, 30 Jan 2002, David Dyck wrote:

> drivers/base/core.c
> drivers/base/fs.c
> try to include linux/malloc.h

> and I've noticed that many source files have
> #include <linux/slab.h> /* kmalloc(), kfree() */
> instead of trying to include linux/malloc.h

I have been changing the two malloc.h references to slab.h since at least
2.5.3-pre6 and I think possibly also in 2.5.2.

It seems to work ok.

--
Ben Clifford [email protected] GPG: 30F06950
Job Required in Los Angeles - Will do most things unix or IP for money.
http://www.hawaga.org.uk/resume/resume001.pdf
Live Ben-cam: http://barbarella.hawaga.org.uk/benc-cgi/watchers.cgi


2002-01-31 00:39:17

by Jeff Garzik

[permalink] [raw]
Subject: Re: 2.5.3 missing <linux/malloc.h>

On Wed, Jan 30, 2002 at 03:44:34PM -0700, Andreas Dilger wrote:
> > and I've noticed that many source files have
> > #include <linux/slab.h> /* kmalloc(), kfree() */
> > instead of trying to include linux/malloc.h
>
> That's because they have been updated, and the other ones have not.
> Don't ask me _why_ it was changed that way, but it was.

Cuz malloc.h has been an empty shell since the 2.0.x days or so.

Jeff



2002-02-01 13:24:53

by Heinz J . Mauelshagen

[permalink] [raw]
Subject: Re: 2.5.3 missing <linux/malloc.h>

On Wed, Jan 30, 2002 at 02:52:16PM -0800, Ben Clifford wrote:
> On Wed, 30 Jan 2002, David Dyck wrote:
>
> > drivers/base/core.c
> > drivers/base/fs.c
> > try to include linux/malloc.h

./drivers/video/neofb.c

and

./arch/arm/mach-clps711x/dma.c

include it also.

>
> > and I've noticed that many source files have
> > #include <linux/slab.h> /* kmalloc(), kfree() */
> > instead of trying to include linux/malloc.h
>
> I have been changing the two malloc.h references to slab.h since at least
> 2.5.3-pre6 and I think possibly also in 2.5.2.
>
> It seems to work ok.
>
> --
> Ben Clifford [email protected] GPG: 30F06950
> Job Required in Los Angeles - Will do most things unix or IP for money.
> http://www.hawaga.org.uk/resume/resume001.pdf
> Live Ben-cam: http://barbarella.hawaga.org.uk/benc-cgi/watchers.cgi
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--

Regards,
Heinz -- The LVM Guy --

*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-