Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757737AbbGGO40 (ORCPT ); Tue, 7 Jul 2015 10:56:26 -0400 Received: from mga03.intel.com ([134.134.136.65]:8160 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757705AbbGGO4R (ORCPT ); Tue, 7 Jul 2015 10:56:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,424,1432623600"; d="scan'208";a="601628702" Message-ID: <1436280974.790.1.camel@theros.lm.intel.com> Subject: Re: [PATCH] compiler.h: Fix sparse check errors From: Ross Zwisler To: Mauro Carvalho Chehab Cc: Dan Williams , Linux Kernel Mailing List , Mauro Carvalho Chehab , Christopher Li , linux-sparse@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Dan Carpenter Date: Tue, 07 Jul 2015 08:56:14 -0600 In-Reply-To: <607087dd3321926ddf4f67762be67656501bfa25.1436276428.git.mchehab@osg.samsung.com> References: <607087dd3321926ddf4f67762be67656501bfa25.1436276428.git.mchehab@osg.samsung.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20.rez) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1635 Lines: 41 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 > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/