diff options
| author | David S. Miller <davem@davemloft.net> | 2015-03-03 21:16:48 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-03-03 21:16:48 -0500 |
| commit | 71a83a6db6138b9d41d8a0b6b91cb59f6dc4742c (patch) | |
| tree | f74b6e4e48257ec6ce40b95645ecb8533b9cc1f8 /include/linux/compiler.h | |
| parent | b97526f3ff95f92b107f0fb52cbb8627e395429b (diff) | |
| parent | a6c5170d1edea97c538c81e377e56c7b5c5b7e63 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/rocker/rocker.c
The rocker commit was two overlapping changes, one to rename
the ->vport member to ->pport, and another making the bitmask
expression use '1ULL' instead of plain '1'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/compiler.h')
| -rw-r--r-- | include/linux/compiler.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index d1ec10a940ff..1b45e4a0519b 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -202,7 +202,7 @@ static __always_inline void data_access_exceeds_word_size(void) | |||
| 202 | { | 202 | { |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | static __always_inline void __read_once_size(volatile void *p, void *res, int size) | 205 | static __always_inline void __read_once_size(const volatile void *p, void *res, int size) |
| 206 | { | 206 | { |
| 207 | switch (size) { | 207 | switch (size) { |
| 208 | case 1: *(__u8 *)res = *(volatile __u8 *)p; break; | 208 | case 1: *(__u8 *)res = *(volatile __u8 *)p; break; |
| @@ -259,10 +259,10 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
| 259 | */ | 259 | */ |
| 260 | 260 | ||
| 261 | #define READ_ONCE(x) \ | 261 | #define READ_ONCE(x) \ |
| 262 | ({ typeof(x) __val; __read_once_size(&x, &__val, sizeof(__val)); __val; }) | 262 | ({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) |
| 263 | 263 | ||
| 264 | #define WRITE_ONCE(x, val) \ | 264 | #define WRITE_ONCE(x, val) \ |
| 265 | ({ typeof(x) __val; __val = val; __write_once_size(&x, &__val, sizeof(__val)); __val; }) | 265 | ({ typeof(x) __val = (val); __write_once_size(&(x), &__val, sizeof(__val)); __val; }) |
| 266 | 266 | ||
| 267 | #endif /* __KERNEL__ */ | 267 | #endif /* __KERNEL__ */ |
| 268 | 268 | ||
