From patchwork Tue Jun 30 16:23:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 6697291 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9804A9F380 for ; Tue, 30 Jun 2015 16:24:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA93A20624 for ; Tue, 30 Jun 2015 16:24:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F90A201EC for ; Tue, 30 Jun 2015 16:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbbF3QXo (ORCPT ); Tue, 30 Jun 2015 12:23:44 -0400 Received: from mga03.intel.com ([134.134.136.65]:8201 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbbF3QXZ (ORCPT ); Tue, 30 Jun 2015 12:23:25 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 30 Jun 2015 09:23:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,378,1432623600"; d="scan'208";a="737799865" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga001.fm.intel.com with ESMTP; 30 Jun 2015 09:23:22 -0700 Received: from orsmsx107.amr.corp.intel.com ([169.254.1.203]) by ORSMSX109.amr.corp.intel.com ([169.254.2.135]) with mapi id 14.03.0224.002; Tue, 30 Jun 2015 09:23:21 -0700 From: "Williams, Dan J" To: "dan.carpenter@oracle.com" CC: "toshi.kani@hp.com" , "mingo@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@ml01.01.org" , "tglx@linutronix.de" , "hch@lst.de" , "axboe@kernel.dk" , "hpa@zytor.com" , "mingo@redhat.com" , "linux-fsdevel@vger.kernel.org" , "ross.zwisler@linux.intel.com" , "boaz@plexistor.com" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH v2 17/17] arch, x86: pmem api for ensuring durability of persistent memory updates Thread-Topic: [PATCH v2 17/17] arch, x86: pmem api for ensuring durability of persistent memory updates Thread-Index: AQHQryts59pI3JoeHkWdUuuGpsNBDp3FVBmAgABlDIA= Date: Tue, 30 Jun 2015 16:23:21 +0000 Message-ID: <1435681397.18090.66.camel@intel.com> References: <20150625090554.40066.69562.stgit@dwillia2-desk3.jf.intel.com> <20150625093749.40066.25475.stgit@dwillia2-desk3.jf.intel.com> <20150630102137.GC12986@mwanda> In-Reply-To: <20150630102137.GC12986@mwanda> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-ID: <7DB1C2FDAF222E40BCD89185893F24D6@intel.com> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2015-06-30 at 13:21 +0300, Dan Carpenter wrote: > On Thu, Jun 25, 2015 at 05:37:49AM -0400, Dan Williams wrote: > > diff --git a/include/linux/compiler.h b/include/linux/compiler.h > > index 867722591be2..9a528d945498 100644 > > --- a/include/linux/compiler.h > > +++ b/include/linux/compiler.h > > @@ -21,6 +21,7 @@ > > # define __rcu __attribute__((noderef, address_space(4))) > > On this side of the #ifdef CONFIG_SPARSE_RCU_POINTER statement then > __pmem isn't defined so it leads to a build error running a CHECKER on > today's linux-next. > > I would define __pmem away, but I don't understand why __pmem and > CONFIG_SPARSE_RCU_POINTER are related at all. Maybe it should be > outside the if statement? > Yes it should be outside the if... 8<---- Subject: sparse: fix misplaced __pmem definition From: Dan Williams 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 Reported-by: Dan Carpenter Signed-off-by: Dan Williams --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 26fc8bc77f85..d8fbd500330e 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -17,11 +17,11 @@ # 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 *);