From: Krzysztof Halasa <khc@pm.waw.pl>
To: <linux-kernel@vger.kernel.org>
Subject: unneeded #include <version.h> in many places ?
Date: Tue, 07 Sep 2004 18:17:53 +0200 [thread overview]
Message-ID: <m3d60yxdce.fsf@defiant.pm.waw.pl> (raw)
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
next reply other threads:[~2004-09-07 18:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-07 16:17 Krzysztof Halasa [this message]
2004-09-07 19:32 ` unneeded #include <version.h> in many places ? Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d60yxdce.fsf@defiant.pm.waw.pl \
--to=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox