diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-06-30 12:07:17 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-30 12:07:17 -0400 |
commit | 31f02455455d405320e2f749696bef4e02903b35 (patch) | |
tree | 300b811ed1e6a13d58d83f3117b37bceda92c800 | |
parent | 88793e5c774ec69351ef6b5200bb59f532e41bca (diff) |
sparse: fix misplaced __pmem definition
Move the definition of __pmem outside of CONFIG_SPARSE_RCU_POINTER to fix:
drivers/nvdimm/pmem.c:198:17: sparse: too many arguments for function __builtin_expect
drivers/nvdimm/pmem.c:36:33: sparse: expected ; at end of declaration
drivers/nvdimm/pmem.c:48:21: sparse: void declaration
...due to __pmem failing to be defined in some configurations when
CONFIG_SPARSE_RCU_POINTER=y.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | include/linux/compiler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 26fc8bc77f85..d8fbd500330e 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -17,11 +17,11 @@ | |||
17 | # define __release(x) __context__(x,-1) | 17 | # define __release(x) __context__(x,-1) |
18 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) | 18 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) |
19 | # define __percpu __attribute__((noderef, address_space(3))) | 19 | # define __percpu __attribute__((noderef, address_space(3))) |
20 | # define __pmem __attribute__((noderef, address_space(5))) | ||
20 | #ifdef CONFIG_SPARSE_RCU_POINTER | 21 | #ifdef CONFIG_SPARSE_RCU_POINTER |
21 | # define __rcu __attribute__((noderef, address_space(4))) | 22 | # define __rcu __attribute__((noderef, address_space(4))) |
22 | #else | 23 | #else |
23 | # define __rcu | 24 | # define __rcu |
24 | # define __pmem __attribute__((noderef, address_space(5))) | ||
25 | #endif | 25 | #endif |
26 | extern void __chk_user_ptr(const volatile void __user *); | 26 | extern void __chk_user_ptr(const volatile void __user *); |
27 | extern void __chk_io_ptr(const volatile void __iomem *); | 27 | extern void __chk_io_ptr(const volatile void __iomem *); |