diff options
author | 2015-11-03 14:45:16 -0800 | |
---|---|---|
committer | 2015-11-03 14:45:16 -0800 | |
commit | 84a73014d86fd660822a20c032625e3afe99ca58 (patch) | |
tree | 9e42a2d3c40730947ae18363d00e8a0ee2743792 /include/linux/compiler.h | |
parent | Input: alps - only the Dell Latitude D420/430/620/630 have separate stick button bits (diff) | |
parent | Input: evdev - fix bug in checking duplicate clock change request (diff) | |
download | wireguard-linux-84a73014d86fd660822a20c032625e3afe99ca58.tar.xz wireguard-linux-84a73014d86fd660822a20c032625e3afe99ca58.zip |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.3 merge window.
Diffstat (limited to '')
-rw-r--r-- | include/linux/compiler.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index e08a6ae7c0a4..c836eb2dc44d 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -252,7 +252,12 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s ({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) #define WRITE_ONCE(x, val) \ - ({ union { typeof(x) __val; char __c[1]; } __u = { .__val = (val) }; __write_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) +({ \ + union { typeof(x) __val; char __c[1]; } __u = \ + { .__val = (__force typeof(x)) (val) }; \ + __write_once_size(&(x), __u.__c, sizeof(x)); \ + __u.__val; \ +}) /** * READ_ONCE_CTRL - Read a value heading a control dependency |