diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-23 22:56:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-24 16:04:24 -0400 |
commit | 35c9646062eba15351c6d64ea0c02176e5cb66ac (patch) | |
tree | 46b29964dfbf21e6757b5ab629c6f748897d34e5 /arch/sparc/include | |
parent | 4efcac3a244de86593a82ca4ed945e839eb4c5af (diff) |
sparc: Increase portability of strncpy_from_user() implementation.
Hide details of maximum user address calculation in a new
asm/uaccess.h interface named user_addr_max().
Provide little-endian implementation in find_zero(), which should work
but can probably be improved.
Abstrace alignment check behind IS_UNALIGNED() macro.
Kill double-semicolon, noticed by David Howells.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/uaccess.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h index 42a28cfd941f..20c2acb06332 100644 --- a/arch/sparc/include/asm/uaccess.h +++ b/arch/sparc/include/asm/uaccess.h | |||
@@ -6,6 +6,9 @@ | |||
6 | #include <asm/uaccess_32.h> | 6 | #include <asm/uaccess_32.h> |
7 | #endif | 7 | #endif |
8 | 8 | ||
9 | #define user_addr_max() \ | ||
10 | (segment_eq(get_fs(), USER_DS) ? STACK_TOP : ~0UL) | ||
11 | |||
9 | extern long strncpy_from_user(char *dest, const char __user *src, long count); | 12 | extern long strncpy_from_user(char *dest, const char __user *src, long count); |
10 | 13 | ||
11 | #endif | 14 | #endif |