Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eaa0eda5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull asm-generic uaccess.h cleanup from Arnd Bergmann:
 "Like in 3.19, I once more have a multi-stage cleanup for one
  asm-generic header file, this time the work was done by Michael
  Tsirkin and cleans up the uaccess.h file in asm-generic, as well as
  all architectures for which the respective maintainers did not pick up
  his patches directly"

* tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (37 commits)
  sparc32: nocheck uaccess coding style tweaks
  sparc64: nocheck uaccess coding style tweaks
  xtensa: macro whitespace fixes
  sh: macro whitespace fixes
  parisc: macro whitespace fixes
  m68k: macro whitespace fixes
  m32r: macro whitespace fixes
  frv: macro whitespace fixes
  cris: macro whitespace fixes
  avr32: macro whitespace fixes
  arm64: macro whitespace fixes
  arm: macro whitespace fixes
  alpha: macro whitespace fixes
  blackfin: macro whitespace fixes
  sparc64: uaccess_64 macro whitespace fixes
  sparc32: uaccess_32 macro whitespace fixes
  avr32: whitespace fix
  sh: fix put_user sparse errors
  metag: fix put_user sparse errors
  ia64: fix put_user sparse errors
  ...
parents cad3ab58 643165c8
Loading
Loading
Loading
Loading
+43 −43
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ extern void __get_user_unknown(void);
	  case 8: __get_user_64(ptr); break;			\
	  default: __get_user_unknown(); break;			\
	}							\
	(x) = (__typeof__(*(ptr))) __gu_val;			\
	(x) = (__force __typeof__(*(ptr))) __gu_val;		\
	__gu_err;						\
})

@@ -115,7 +115,7 @@ extern void __get_user_unknown(void);
		  default: __get_user_unknown(); break;			\
		}							\
	}								\
	(x) = (__typeof__(*(ptr))) __gu_val;				\
	(x) = (__force __typeof__(*(ptr))) __gu_val;			\
	__gu_err;							\
})

+48 −48
Original line number Diff line number Diff line
@@ -413,14 +413,14 @@ do { \
#ifndef __ARMEB__
#define __put_user_asm_half(x, __pu_addr, err)			\
({								\
	unsigned long __temp = (unsigned long)(x);		\
	unsigned long __temp = (__force unsigned long)(x);	\
	__put_user_asm_byte(__temp, __pu_addr, err);		\
	__put_user_asm_byte(__temp >> 8, __pu_addr + 1, err);	\
})
#else
#define __put_user_asm_half(x, __pu_addr, err)			\
({								\
	unsigned long __temp = (unsigned long)(x);		\
	unsigned long __temp = (__force unsigned long)(x);	\
	__put_user_asm_byte(__temp >> 8, __pu_addr, err);	\
	__put_user_asm_byte(__temp, __pu_addr + 1, err);	\
})
+2 −2
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ do { \
	default:							\
		BUILD_BUG();						\
	}								\
	(x) = (__typeof__(*(ptr)))__gu_val;				\
	(x) = (__force __typeof__(*(ptr)))__gu_val;			\
} while (0)

#define __get_user(x, ptr)						\
+12 −12
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ extern int __put_user_bad(void);
	default: __gu_err = __get_user_bad(); break;			\
	}								\
									\
	x = (typeof(*(ptr)))__gu_val;					\
	x = (__force typeof(*(ptr)))__gu_val;				\
	__gu_err;							\
})

@@ -222,7 +222,7 @@ extern int __put_user_bad(void);
	} else {							\
		__gu_err = -EFAULT;					\
	}								\
	x = (typeof(*(ptr)))__gu_val;					\
	x = (__force typeof(*(ptr)))__gu_val;				\
	__gu_err;							\
})

+16 −16
Original line number Diff line number Diff line
@@ -89,10 +89,10 @@ struct exception_table_entry {
			break;					\
		case 8: {					\
			long _xl, _xh;				\
			_xl = ((long *)&_x)[0];			\
			_xh = ((long *)&_x)[1];			\
			__put_user_asm(_xl, ((long __user *)_p)+0, );	\
			__put_user_asm(_xh, ((long __user *)_p)+1, );	\
			_xl = ((__force long *)&_x)[0];		\
			_xh = ((__force long *)&_x)[1];		\
			__put_user_asm(_xl, ((__force long __user *)_p)+0, );\
			__put_user_asm(_xh, ((__force long __user *)_p)+1, );\
		} break;					\
		default:					\
			_err = __put_user_bad();		\
@@ -147,7 +147,7 @@ static inline int bad_user_access_length(void)
		}						\
	} else							\
		_err = -EFAULT;					\
	x = (typeof(*(ptr)))_val;				\
	x = (__force typeof(*(ptr)))_val;			\
	_err;							\
})

Loading