missing #includes?

From: Randy.Dunlap (randy.dunlap@verizon.net)
Date: Sat Apr 26 2003 - 01:51:19 EST


Hi,

I wrote a trivial bash script to check if <sourcefiles> #include
<headerfile> when <symbol> is used. Run it at top of kernel tree,
like so:

$ check-header STACK_MAGIC linux/kernel.h
error: linux/kernel.h not found in ./arch/h8300/kernel/traps.c

What's the preferred thing to do here? I would like to see explicit
#includes when symbols are used. Is that what others expect also?

However, it makes for quite a large list of missing includes.

-- 
~Randy

Here are 2 more examples.

$ check-header KERN_EMERG linux/kernel.h error: linux/kernel.h not found in ./arch/ppc64/kernel/ras.c error: linux/kernel.h not found in ./drivers/s390/cio/device_fsm.c error: linux/kernel.h not found in ./drivers/s390/block/dasd_3990_erp.c error: linux/kernel.h not found in ./drivers/s390/s390mach.c error: linux/kernel.h not found in ./drivers/char/watchdog/pcwd.c error: linux/kernel.h not found in ./drivers/char/agp/intel-agp.c error: linux/kernel.h not found in ./drivers/base/power.c error: linux/kernel.h not found in ./drivers/net/oaknet.c error: linux/kernel.h not found in ./fs/reiserfs/prints.c error: linux/kernel.h not found in ./fs/ext3/inode.c error: linux/kernel.h not found in ./fs/jbd/journal.c error: linux/kernel.h not found in ./fs/jbd/transaction.c error: linux/kernel.h not found in ./kernel/sys.c error: linux/kernel.h not found in ./kernel/panic.c

$ check-header NIPQUAD linux/kernel.h error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_conntrack_core.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_nat_core.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_tables.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_nat_tftp.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_nat_rule.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_conntrack_standalone.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ipt_TCPMSS.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ipt_MASQUERADE.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_conntrack_amanda.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_nat_ftp.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_conntrack_irc.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ip_conntrack_ftp.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ipchains_core.c error: linux/kernel.h not found in ./net/ipv4/netfilter/ipt_LOG.c error: linux/kernel.h not found in ./net/ipv4/udp.c error: linux/kernel.h not found in ./net/ipv4/ip_fragment.c error: linux/kernel.h not found in ./net/ipv4/tcp_ipv4.c error: linux/kernel.h not found in ./net/ipv4/tcp_input.c error: linux/kernel.h not found in ./net/ipv4/ipcomp.c error: linux/kernel.h not found in ./net/ipv4/tcp_timer.c error: linux/kernel.h not found in ./net/core/netfilter.c error: linux/kernel.h not found in ./net/sunrpc/svcsock.c error: linux/kernel.h not found in ./net/bridge/netfilter/ebt_log.c error: linux/kernel.h not found in ./net/atm/mpoa_caches.c error: linux/kernel.h not found in ./net/sctp/protocol.c error: linux/kernel.h not found in ./net/sctp/sm_sideeffect.c error: linux/kernel.h not found in ./fs/afs/proc.c error: linux/kernel.h not found in ./fs/cifs/connect.c


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



This archive was generated by hypermail 2b29 : Wed Apr 30 2003 - 22:00:23 EST