linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jon DeVree <nuxi@vault24.org>
Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] kernel/sys.c: Add build-time check for UNAME26
Date: Mon,  2 Mar 2015 14:10:52 +0100	[thread overview]
Message-ID: <1425301852-31298-1-git-send-email-geert@linux-m68k.org> (raw)

Add a build-time check for the major version number, to make sure Linus
will update the UNAME26 implementation (and the comment at the top of
the function) at the next version increase.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 kernel/sys.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/sys.c b/kernel/sys.c
index a03d9cd23ed779b2..ead9bd7b8a47eee4 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1128,6 +1128,7 @@ static int override_release(char __user *release, size_t len)
 				break;
 			rest++;
 		}
+		BUILD_BUG_ON((LINUX_VERSION_CODE >> 16) != 4);
 		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60;
 		copy = clamp_t(size_t, len, 1, sizeof(buf));
 		copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
-- 
1.9.1


             reply	other threads:[~2015-03-02 13:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 13:10 Geert Uytterhoeven [this message]
2015-03-02 21:46 ` [PATCH] kernel/sys.c: Add build-time check for UNAME26 Linus Torvalds

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=1425301852-31298-1-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuxi@vault24.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;
as well as URLs for NNTP newsgroup(s).