selftests/x86/pkeys: Remove unused functions

"Linux Kernel Mailing List" <[email protected]> Thu, 15 Feb 2018 01:31:43 +0000 (UTC)
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/ce676638fe7b284132a7d7d5e7e7ad81bab9947e
Commit:     ce676638fe7b284132a7d7d5e7e7ad81bab9947e
Parent:     d8e92de8ef952bed88c56c7a44c02d8dcae0984e
Refname:    refs/heads/master
Author:     Ingo Molnar <[email protected]>
AuthorDate: Tue Feb 13 08:26:17 2018 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue Feb 13 09:04:56 2018 +0100

    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 <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Thomas Gleixner <[email protected]>
    Cc: Dave Hansen <[email protected]>
    Cc: Shuah Khan <[email protected]>
    Cc: Andy Lutomirski <[email protected]>
    Cc: [email protected]
    Signed-off-by: Ingo Molnar <[email protected]>
---
 tools/testing/selftests/x86/protection_keys.c | 28 ---------------------------
 1 file changed, 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)
 	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);
-}