linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/sys.c: Add build-time check for UNAME26
@ 2015-03-02 13:10 Geert Uytterhoeven
  2015-03-02 21:46 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2015-03-02 13:10 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Jon DeVree
  Cc: linux-kernel, Geert Uytterhoeven

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernel/sys.c: Add build-time check for UNAME26
  2015-03-02 13:10 [PATCH] kernel/sys.c: Add build-time check for UNAME26 Geert Uytterhoeven
@ 2015-03-02 21:46 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2015-03-02 21:46 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Andrew Morton, Jon DeVree, Linux Kernel Mailing List

On Mon, Mar 2, 2015 at 5:10 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 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.

I really can't imagine that anybody ever cares about the exact "2.6.x"
value, as long as x > 40. So even the original "update 40 to 60" was
borderline. I don't think I will ever accept an update to this any
more.

If anything, I'd just say "fix it at 2.6.60" or something, and get rid
of the insane version code "emulation" crap. Nobody cares.

                          Linus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-02 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-02 13:10 [PATCH] kernel/sys.c: Add build-time check for UNAME26 Geert Uytterhoeven
2015-03-02 21:46 ` Linus Torvalds

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).