selftests/x86: Clean up and document sscanf() usage
authorDominik Brodowski <linux@dominikbrodowski.net>
Sun, 11 Feb 2018 20:59:24 +0000 (21:59 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 13 Feb 2018 08:04:56 +0000 (09:04 +0100)
commitd8e92de8ef952bed88c56c7a44c02d8dcae0984e
tree4c01ef70a580ea359004440800fd0790030ba25d
parent198ee8e17502da2634f7366395db1d77630e0219
selftests/x86: Clean up and document sscanf() usage

Replace a couple of magically connected buffer length literal constants with
a common definition that makes their relationship obvious. Also document
why our sscanf() usage is safe.

No intended functional changes.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Andrew Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kselftest@vger.kernel.org
Cc: shuah@kernel.org
Link: http://lkml.kernel.org/r/20180211205924.GA23210@light.dominikbrodowski.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/test_vdso.c
tools/testing/selftests/x86/test_vsyscall.c