Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Remove orphaned __addr_ok() definition

Since commit 12a0ef7b0ac3 ("arm64: use generic strnlen_user and
strncpy_from_user functions"), the definition of __addr_ok() has been
languishing unused; eradicate the sucker.

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

authored by

Robin Murphy and committed by
Will Deacon
db413b51 ab2e1b89

-13
-13
arch/arm64/include/asm/uaccess.h
··· 81 81 #define segment_eq(a, b) ((a) == (b)) 82 82 83 83 /* 84 - * Return 1 if addr < current->addr_limit, 0 otherwise. 85 - */ 86 - #define __addr_ok(addr) \ 87 - ({ \ 88 - unsigned long flag; \ 89 - asm("cmp %1, %0; cset %0, lo" \ 90 - : "=&r" (flag) \ 91 - : "r" (addr), "0" (current_thread_info()->addr_limit) \ 92 - : "cc"); \ 93 - flag; \ 94 - }) 95 - 96 - /* 97 84 * Test whether a block of memory is a valid user space address. 98 85 * Returns 1 if the range is valid, 0 otherwise. 99 86 *