aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-11-03 14:45:16 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-11-03 14:45:16 -0800
commit84a73014d86fd660822a20c032625e3afe99ca58 (patch)
tree9e42a2d3c40730947ae18363d00e8a0ee2743792 /include/linux/compiler.h
parentInput: alps - only the Dell Latitude D420/430/620/630 have separate stick button bits (diff)
parentInput: evdev - fix bug in checking duplicate clock change request (diff)
downloadwireguard-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.h7
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