From patchwork Thu Jun 9 14:57:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 865882 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p59EwTqq018471 for ; Thu, 9 Jun 2011 14:58:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169Ab1FIO6H (ORCPT ); Thu, 9 Jun 2011 10:58:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42864 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019Ab1FIO5j (ORCPT ); Thu, 9 Jun 2011 10:57:39 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 4EFE189FC6; Thu, 9 Jun 2011 16:57:38 +0200 (CEST) Received: by sepie.suse.cz (Postfix, from userid 10020) id 26C68764B4; Thu, 9 Jun 2011 16:57:38 +0200 (CEST) From: Michal Marek To: Linus Torvalds Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] kbuild: Fix for empty SUBLEVEL or PATCHLEVEL Date: Thu, 9 Jun 2011 16:57:25 +0200 Message-Id: <1307631448-29848-3-git-send-email-mmarek@suse.cz> X-Mailer: git-send-email 1.7.4.2 In-Reply-To: <1307631448-29848-1-git-send-email-mmarek@suse.cz> References: <1307631448-29848-1-git-send-email-mmarek@suse.cz> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Jun 2011 14:58:38 +0000 (UTC) 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 --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 4fe9075..60d4a67 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 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) endef