mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] remove compiler.h from mmap.c
@ 2002-04-11 17:37 Rik van Riel
  2002-04-11 17:51 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Rik van Riel @ 2002-04-11 17:37 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel


compiler.h is included via other include files now and its
#include has been removed from most C files, this patch
finishes the job for mm/*

Rik
-- 
Will hack the VM for food.

http://www.surriel.com/		http://distro.conectiva.com/


diff -Nru a/mm/mmap.c b/mm/mmap.c
--- a/mm/mmap.c Thu Apr 11 14:21:58 2002
+++ b/mm/mmap.c Thu Apr 11 14:21:58 2002
@@ -14,7 +14,6 @@
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/personality.h>
-#include <linux/compiler.h>

 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>



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

* Re: [PATCH] remove compiler.h from mmap.c
  2002-04-11 17:37 [PATCH] remove compiler.h from mmap.c Rik van Riel
@ 2002-04-11 17:51 ` Tom Rini
  2002-04-11 17:58   ` Rik van Riel
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2002-04-11 17:51 UTC (permalink / raw)
  To: Rik van Riel; +Cc: Marcelo Tosatti, linux-kernel

On Thu, Apr 11, 2002 at 02:37:23PM -0300, Rik van Riel wrote:

> compiler.h is included via other include files now and its
> #include has been removed from most C files, this patch
> finishes the job for mm/*

What #include file is mm/mmap.c getting <linux/compiler.h> from now?
Hiding (or relying on indirect) #includes isn't always a good thing...

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

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

* Re: [PATCH] remove compiler.h from mmap.c
  2002-04-11 17:51 ` Tom Rini
@ 2002-04-11 17:58   ` Rik van Riel
  2002-04-12  4:52     ` Paul Mackerras
  0 siblings, 1 reply; 4+ messages in thread
From: Rik van Riel @ 2002-04-11 17:58 UTC (permalink / raw)
  To: Tom Rini; +Cc: Marcelo Tosatti, linux-kernel

On Thu, 11 Apr 2002, Tom Rini wrote:
> On Thu, Apr 11, 2002 at 02:37:23PM -0300, Rik van Riel wrote:
>
> > compiler.h is included via other include files now and its
> > #include has been removed from most C files, this patch
> > finishes the job for mm/*
>
> What #include file is mm/mmap.c getting <linux/compiler.h> from now?

slab.h -> mm.h -> sched.h -> kernel.h -> compiler.h

> Hiding (or relying on indirect) #includes isn't always a good thing...

Absolutely agreed, but likely/unlikely is such low-level
stuff that it shouldn't be included directly into .c files,
IMHO.

regards,

Rik
-- 
Will hack the VM for food.

http://www.surriel.com/		http://distro.conectiva.com/


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

* Re: [PATCH] remove compiler.h from mmap.c
  2002-04-11 17:58   ` Rik van Riel
@ 2002-04-12  4:52     ` Paul Mackerras
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2002-04-12  4:52 UTC (permalink / raw)
  To: Rik van Riel; +Cc: Tom Rini, Marcelo Tosatti, linux-kernel

Rik van Riel writes:

> Absolutely agreed, but likely/unlikely is such low-level
> stuff that it shouldn't be included directly into .c files,
> IMHO.

mm/mmap.c uses unlikely (line 570).  Therefore it should include
compiler.h itself IMHO, not rely on some other header to include it.
I think that each .c and .h file should include the headers that
define the things it uses, but should not have to include headers just
to define things that subsequent headers use.

Regards,
Paul.

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

end of thread, other threads:[~2002-04-12  4:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-11 17:37 [PATCH] remove compiler.h from mmap.c Rik van Riel
2002-04-11 17:51 ` Tom Rini
2002-04-11 17:58   ` Rik van Riel
2002-04-12  4:52     ` Paul Mackerras

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®