summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/x86/protection_keys.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-02-13 08:26:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 15:42:22 +0100
commite6eced764e1a18665212c349f100188a337d8fa8 (patch)
treed315658a7da484349490f5e9715fc5ade1a1d43c /tools/testing/selftests/x86/protection_keys.c
parent3eb95d5187a3df8c0aa1d5f531a6b9f567fcd9a7 (diff)
downloadlinux-stable-e6eced764e1a18665212c349f100188a337d8fa8.tar.gz
linux-stable-e6eced764e1a18665212c349f100188a337d8fa8.tar.bz2
linux-stable-e6eced764e1a18665212c349f100188a337d8fa8.zip
selftests/x86/pkeys: Remove unused functions
commit ce676638fe7b284132a7d7d5e7e7ad81bab9947e upstream. This also gets rid of two build warnings: protection_keys.c: In function ‘dumpit’: protection_keys.c:419:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(1, buf, nr_read); ^~~~~~~~~~~~~~~~~~~~~~ Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/x86/protection_keys.c')
-rw-r--r--tools/testing/selftests/x86/protection_keys.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
index 7a1cc0e56d2d..6cbb83b47150 100644
--- a/tools/testing/selftests/x86/protection_keys.c
+++ b/tools/testing/selftests/x86/protection_keys.c
@@ -393,34 +393,6 @@ pid_t fork_lazy_child(void)
return forkret;
}
-void davecmp(void *_a, void *_b, int len)
-{
- int i;
- unsigned long *a = _a;
- unsigned long *b = _b;
-
- for (i = 0; i < len / sizeof(*a); i++) {
- if (a[i] == b[i])
- continue;
-
- dprintf3("[%3d]: a: %016lx b: %016lx\n", i, a[i], b[i]);
- }
-}
-
-void dumpit(char *f)
-{
- int fd = open(f, O_RDONLY);
- char buf[100];
- int nr_read;
-
- dprintf2("maps fd: %d\n", fd);
- do {
- nr_read = read(fd, &buf[0], sizeof(buf));
- write(1, buf, nr_read);
- } while (nr_read > 0);
- close(fd);
-}
-
#define PKEY_DISABLE_ACCESS 0x1
#define PKEY_DISABLE_WRITE 0x2