* [PATCH] compiler.h: Fix sparse check errors
@ 2015-07-07 13:43 Mauro Carvalho Chehab
2015-07-07 14:56 ` Ross Zwisler
0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2015-07-07 13:43 UTC (permalink / raw)
To: Dan Williams
Cc: Mauro Carvalho Chehab, Linux Kernel Mailing List,
Mauro Carvalho Chehab, Christopher Li, linux-sparse,
Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Ross Zwisler,
Dan Carpenter
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@osg.samsung.com>
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] compiler.h: Fix sparse check errors
2015-07-07 13:43 [PATCH] compiler.h: Fix sparse check errors Mauro Carvalho Chehab
@ 2015-07-07 14:56 ` Ross Zwisler
0 siblings, 0 replies; 2+ messages in thread
From: Ross Zwisler @ 2015-07-07 14:56 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Dan Williams, Linux Kernel Mailing List, Mauro Carvalho Chehab,
Christopher Li, linux-sparse, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, Dan Carpenter
On Tue, 2015-07-07 at 10:43 -0300, Mauro Carvalho Chehab wrote:
> 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@osg.samsung.com>
>
> 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
Yep, thank you for the fix. I think Dan already has a version of this queued
up in his tree for his next pull request:
https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/commit/?h=libnvdimm-pending&id=31f02455455d405320e2f749696bef4e02903b35
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-07 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-07 13:43 [PATCH] compiler.h: Fix sparse check errors Mauro Carvalho Chehab
2015-07-07 14:56 ` Ross Zwisler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).