Skip to content

Commit 60d7b9c

Browse files
ingomolnargregkh
authored andcommitted
selftests/x86/pkeys: Remove unused functions
commit ce67663 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>
1 parent 3aad6fe commit 60d7b9c

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

tools/testing/selftests/x86/protection_keys.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -381,34 +381,6 @@ pid_t fork_lazy_child(void)
381381
return forkret;
382382
}
383383

384-
void davecmp(void *_a, void *_b, int len)
385-
{
386-
int i;
387-
unsigned long *a = _a;
388-
unsigned long *b = _b;
389-
390-
for (i = 0; i < len / sizeof(*a); i++) {
391-
if (a[i] == b[i])
392-
continue;
393-
394-
dprintf3("[%3d]: a: %016lx b: %016lx\n", i, a[i], b[i]);
395-
}
396-
}
397-
398-
void dumpit(char *f)
399-
{
400-
int fd = open(f, O_RDONLY);
401-
char buf[100];
402-
int nr_read;
403-
404-
dprintf2("maps fd: %d\n", fd);
405-
do {
406-
nr_read = read(fd, &buf[0], sizeof(buf));
407-
write(1, buf, nr_read);
408-
} while (nr_read > 0);
409-
close(fd);
410-
}
411-
412384
#define PKEY_DISABLE_ACCESS 0x1
413385
#define PKEY_DISABLE_WRITE 0x2
414386

0 commit comments

Comments
 (0)