Skip to content

Commit

Permalink
8300: switch to RAW_COPY_USER
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Mar 28, 2017
1 parent d597580 commit 33ab2da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ config H8300
select HAVE_ARCH_KGDB
select HAVE_ARCH_HASH
select CPU_NO_EFFICIENT_FFS
select ARCH_HAS_RAW_COPY_USER

config RWSEM_GENERIC_SPINLOCK
def_bool y
Expand Down
10 changes: 6 additions & 4 deletions arch/h8300/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <linux/string.h>

static inline __must_check long __copy_from_user(void *to,
const void __user * from, unsigned long n)
static inline __must_check unsigned long
raw_copy_from_user(void *to, const void __user * from, unsigned long n)
{
if (__builtin_constant_p(n)) {
switch(n) {
Expand All @@ -24,8 +24,8 @@ static inline __must_check long __copy_from_user(void *to,
return 0;
}

static inline __must_check long __copy_to_user(void __user *to,
const void *from, unsigned long n)
static inline __must_check unsigned long
raw_copy_to_user(void __user *to, const void *from, unsigned long n)
{
if (__builtin_constant_p(n)) {
switch(n) {
Expand All @@ -46,6 +46,8 @@ static inline __must_check long __copy_to_user(void __user *to,
memcpy((void __force *)to, from, n);
return 0;
}
#define INLINE_COPY_FROM_USER
#define INLINE_COPY_TO_USER

#include <asm-generic/uaccess.h>

Expand Down

0 comments on commit 33ab2da

Please sign in to comment.