From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Christopher Li <sparse@chrisli.org>,
linux-sparse@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] compiler.h: Fix sparse check errors
Date: Tue, 07 Jul 2015 08:56:14 -0600 [thread overview]
Message-ID: <1436280974.790.1.camel@theros.lm.intel.com> (raw)
In-Reply-To: <607087dd3321926ddf4f67762be67656501bfa25.1436276428.git.mchehab@osg.samsung.com>
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
prev parent reply other threads:[~2015-07-07 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 13:43 [PATCH] compiler.h: Fix sparse check errors Mauro Carvalho Chehab
2015-07-07 14:56 ` Ross Zwisler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436280974.790.1.camel@theros.lm.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.com \
--cc=mingo@redhat.com \
--cc=sparse@chrisli.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).