All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Masahiro Yamada' <masahiroy@kernel.org>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Christian Zigotzky <chzigotzky@xenosoft.de>
Cc: Sasha Levin <sashal@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL again
Date: Mon, 1 Mar 2021 17:10:39 +0000	[thread overview]
Message-ID: <43d9bcb59bdc4ac7aa42de1be78fa339@AcuMS.aculab.com> (raw)
In-Reply-To: <20210227142023.63480-1-masahiroy@kernel.org>

From: Masahiro Yamada
> Sent: 27 February 2021 14:20
> 
> Commit 9b82f13e7ef3 ("kbuild: clamp SUBLEVEL to 255") breaks the build
> if SUBLEVEL or PATCHLEVEL is empty.
> 
> Commit 78d3bb4483ba ("kbuild: Fix <linux/version.h> for empty SUBLEVEL
> or PATCHLEVEL") fixed the issue by prepending a zero.
> 
> This time, we cannot take the same approach because we have C code:
> 
>   #define LINUX_VERSION_PATCHLEVEL $(PATCHLEVEL)
>   #define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)
> 
> Replace empty SUBLEVEL or PATCHLEVEL with a zero.

You could do:

#define LINUX_VERSION_PATCHLEVEL ($(PATCHLEVEL) + 0)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


      parent reply	other threads:[~2021-03-01 21:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27 14:20 [PATCH] kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL again Masahiro Yamada
2021-02-28  1:19 ` Sasha Levin
2021-03-01 17:10 ` David Laight [this message]

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=43d9bcb59bdc4ac7aa42de1be78fa339@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=chzigotzky@xenosoft.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=sashal@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.