[PATCH] compiler.h: Fix sparse check errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The #define __pmem was put at the wrong place, inside a
__rcu check. The way it is, if CONFIG_SPARSE_RCU_POINTER is
not defined, it will produce thousands of errors like:

./arch/x86/include/asm/io.h:251:27: error: void declaration
./arch/x86/include/asm/io.h:251:27: error: Expected ; at end of declaration
./arch/x86/include/asm/io.h:251:27: error: got *

making sparse pretty much useless, due to the excess of noise.

So, move the define out of the sparse RCU pointer check.

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 7f8ad9593da7..4f85b58b7285 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -21,8 +21,8 @@
 # define __rcu		__attribute__((noderef, address_space(4)))
 #else
 # define __rcu
+#endif
 # 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 *);
 #else
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux