diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-02-13 02:26:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-02-13 03:04:56 -0500 |
commit | ce676638fe7b284132a7d7d5e7e7ad81bab9947e (patch) | |
tree | 1babf06a08b3d47445da30acd3d5ba7412a4288b /tools | |
parent | d8e92de8ef952bed88c56c7a44c02d8dcae0984e (diff) |
selftests/x86/pkeys: Remove unused functions
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/x86/protection_keys.c | 28 |
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 bc1b0735bb50..f15aa5a76fe3 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) | |||
393 | return forkret; | 393 | return forkret; |
394 | } | 394 | } |
395 | 395 | ||
396 | void davecmp(void *_a, void *_b, int len) | ||
397 | { | ||
398 | int i; | ||
399 | unsigned long *a = _a; | ||
400 | unsigned long *b = _b; | ||
401 | |||
402 | for (i = 0; i < len / sizeof(*a); i++) { | ||
403 | if (a[i] == b[i]) | ||
404 | continue; | ||
405 | |||
406 | dprintf3("[%3d]: a: %016lx b: %016lx\n", i, a[i], b[i]); | ||
407 | } | ||
408 | } | ||
409 | |||
410 | void dumpit(char *f) | ||
411 | { | ||
412 | int fd = open(f, O_RDONLY); | ||
413 | char buf[100]; | ||
414 | int nr_read; | ||
415 | |||
416 | dprintf2("maps fd: %d\n", fd); | ||
417 | do { | ||
418 | nr_read = read(fd, &buf[0], sizeof(buf)); | ||
419 | write(1, buf, nr_read); | ||
420 | } while (nr_read > 0); | ||
421 | close(fd); | ||
422 | } | ||
423 | |||
424 | #define PKEY_DISABLE_ACCESS 0x1 | 396 | #define PKEY_DISABLE_ACCESS 0x1 |
425 | #define PKEY_DISABLE_WRITE 0x2 | 397 | #define PKEY_DISABLE_WRITE 0x2 |
426 | 398 | ||