]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparse: fix misplaced __pmem definition
authorDan Williams <dan.j.williams@intel.com>
Tue, 30 Jun 2015 16:07:17 +0000 (12:07 -0400)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:18:59 +0000 (12:18 -0500)
Orabug: 22913653

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>
(cherry picked from commit 31f02455455d405320e2f749696bef4e02903b35)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
include/linux/compiler.h

index 9a528d94549840126720897cbc98d6a2cdb2e9ae..07cacb2e88f03bddf2668e0fbd63c99ff6b2629d 100644 (file)
 # define __release(x)  __context__(x,-1)
 # define __cond_lock(x,c)      ((c) ? ({ __acquire(x); 1; }) : 0)
 # define __percpu      __attribute__((noderef, address_space(3)))
+# define __pmem                __attribute__((noderef, address_space(5)))
 #ifdef CONFIG_SPARSE_RCU_POINTER
 # define __rcu         __attribute__((noderef, address_space(4)))
 #else
 # define __rcu
-# define __pmem                __attribute__((noderef, address_space(5)))
 #endif
 extern void __chk_user_ptr(const volatile void __user *);
 extern void __chk_io_ptr(const volatile void __iomem *);