mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.5.3 missing <linux/malloc.h>
@ 2002-01-30 22:28 David Dyck
  2002-01-30 22:44 ` Andreas Dilger
  2002-01-30 22:52 ` Ben Clifford
  0 siblings, 2 replies; 5+ messages in thread
From: David Dyck @ 2002-01-30 22:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: R.E.Wolff


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?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.3 missing <linux/malloc.h>
  2002-01-30 22:28 2.5.3 missing <linux/malloc.h> David Dyck
@ 2002-01-30 22:44 ` Andreas Dilger
  2002-01-31  0:38   ` Jeff Garzik
  2002-01-30 22:52 ` Ben Clifford
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2002-01-30 22:44 UTC (permalink / raw)
  To: David Dyck; +Cc: linux-kernel, R.E.Wolff

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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.3 missing <linux/malloc.h>
  2002-01-30 22:28 2.5.3 missing <linux/malloc.h> David Dyck
  2002-01-30 22:44 ` Andreas Dilger
@ 2002-01-30 22:52 ` Ben Clifford
  2002-02-01 13:19   ` Heinz J . Mauelshagen
  1 sibling, 1 reply; 5+ messages in thread
From: Ben Clifford @ 2002-01-30 22:52 UTC (permalink / raw)
  To: David Dyck; +Cc: linux-kernel

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     benc@hawaga.org.uk     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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.3 missing <linux/malloc.h>
  2002-01-30 22:44 ` Andreas Dilger
@ 2002-01-31  0:38   ` Jeff Garzik
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2002-01-31  0:38 UTC (permalink / raw)
  To: David Dyck, linux-kernel, R.E.Wolff

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.3 missing <linux/malloc.h>
  2002-01-30 22:52 ` Ben Clifford
@ 2002-02-01 13:19   ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 5+ messages in thread
From: Heinz J . Mauelshagen @ 2002-02-01 13:19 UTC (permalink / raw)
  To: Ben Clifford; +Cc: David Dyck, linux-kernel

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     benc@hawaga.org.uk     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 majordomo@vger.kernel.org
> 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
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-02-01 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-30 22:28 2.5.3 missing <linux/malloc.h> David Dyck
2002-01-30 22:44 ` Andreas Dilger
2002-01-31  0:38   ` Jeff Garzik
2002-01-30 22:52 ` Ben Clifford
2002-02-01 13:19   ` Heinz J . Mauelshagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®