lkml.org 
[lkml]   [2006]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dealing with excessive includes
Matthew Wilcox wrote:

> Let me try to explain the problem again, because what you wrote has
> nothing to do with the problem.
>
> canonicalize_irq() is defined in <asm/irq.h>. No .c file should be
> including <asm/irq.h> in order to get it. It should be including
> <linux/interrupt.h>, which will indirectly pull in <asm/irq.h>
>
> add_wait_queue() is defined in <linux/wait.h>. .c files wishing to use
> add_wait_queue() should be including <linux/wait.h> rather than relying
> on it being pulled in through some other path.
>
> This needs annotations to fix, or a big bag of unreliable heuristics.

Does fixing it really fix anything? I agree that cleaning it all up would
be great. But the aim should be to make less work for developers, rather
than more.

If you have an

#ifndef _LINUX_INTERRUPT_H
#error ...

That almost explicitly tells you which is the correct file to include to
get all definitions from this file. Wouldn't that help?

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
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/

\
 
 \ /
  Last update: 2006-10-23 03:53    [W:1.259 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site