public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* unneeded #include <version.h> in many places ?
@ 2004-09-07 16:17 Krzysztof Halasa
  2004-09-07 19:32 ` Adrian Bunk
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Halasa @ 2004-09-07 16:17 UTC (permalink / raw)
  To: linux-kernel

Hi,

I noticed some kernel .c files #include <version.h> which typically
contains something like:

#define UTS_RELEASE "2.6.9-rc1"
#define LINUX_VERSION_CODE 132617
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

However, those files don't reference the macros.

The question is: are these includes completely unneeded, so I can
remove them, or do they serve some special purpose?

Another one: there are drivers using constructs like:

#if LINUX_VERSION_CODE > 0x20115
...
#endif

I understand they can be somehow useful for authors supporting many
kernel versions with a single set of files, however the gain isn't
clear to me. Should such conditional code be a) removed, b) left
in place, c) dealt with each case individually?
-- 
Krzysztof Halasa

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

end of thread, other threads:[~2004-09-07 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-07 16:17 unneeded #include <version.h> in many places ? Krzysztof Halasa
2004-09-07 19:32 ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox