Re: dealing with excessive includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux