From: Michal Marek <mmarek@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] kbuild: Fix <linux/version.h> for X.Y versions
Date: Mon, 30 May 2011 16:50:50 +0200 [thread overview]
Message-ID: <1306767052-15593-3-git-send-email-mmarek@suse.cz> (raw)
In-Reply-To: <1306767052-15593-1-git-send-email-mmarek@suse.cz>
expr treats all numbers as decimals, so prepending a zero is safe. Note
that the KERNEL_VERSION() macro still takes three arguments, 3.0 has to be
written as KERNEL_VERSION(3,0,0).
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index c706ae1..130e282 100644
--- a/Makefile
+++ b/Makefile
@@ -1005,7 +1005,7 @@ endef
define filechk_version.h
(echo \#define LINUX_VERSION_CODE $(shell \
- expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
+ expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef
--
1.7.4.1
next prev parent reply other threads:[~2011-05-30 14:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 14:50 [PATCH 0/4] Fixes for X.Y kernel versions Michal Marek
2011-05-30 14:50 ` [PATCH 1/4] kbuild: Fix KERNELVERSION for X.Y versions Michal Marek
2011-05-30 14:50 ` Michal Marek [this message]
2011-05-30 15:08 ` [PATCH 2/4] kbuild: Fix <linux/version.h> " Valdis.Kletnieks
2011-05-31 9:01 ` Michal Marek
2011-05-31 9:07 ` Américo Wang
2011-05-30 14:50 ` [PATCH 3/4] perf: Use make kernelversion instead of parsing the Makefile Michal Marek
2011-05-30 14:50 ` [PATCH 4/4] kbuild: Hack for depmod not handling X.Y versions Michal Marek
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=1306767052-15593-3-git-send-email-mmarek@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®