Re: [Bug 352] New: Unneccessary includes of linux/version.h

Date: Thu Feb 13 2003 - 15:57:59 EST

On Thu, 13 Feb 2003 12:13:08 PST, "Martin J. Bligh" <> said:

> There appears to be a large number of kernel files (267) that #include
> <linux/version.h>, but do not use any of the three things defined in it.
> This causes these files to be needlessly(I think) recompiled during a
> kernel rebuild if only the version.h file changes. Would a patch to remove
> these extra includes be accepted?
> Here is the list (generated with a script, so it could be wrong..)

Did your script include tracing of second-order effects?

The following reference one of the 3 version.h variables but don't include
linux/version.h themselves:


So for instance, the ipchains_core.h may explain these files in your list:


because *somebody* needs to include version.h.

So a patch may be needed, but it should add the #include to the .h file while
cleaning up the .c files. On the other hand, I'll let somebody who understands
the kernel build system better than I comment on what happens to dependencies
and whether the files that *appear* to be gratuitously rebuilt in fact do need
to be rebuilt....

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:49 EST