From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from linode.aoot.com (linode.aoot.com [69.164.194.13]) by ml01.01.org (Postfix) with ESMTP id 8F13A21A04830 for ; Wed, 5 Apr 2017 08:41:47 -0700 (PDT) From: "Steve Wise" References: <1490911959-5146-1-git-send-email-logang@deltatee.com> <1490911959-5146-3-git-send-email-logang@deltatee.com> In-Reply-To: Subject: RE: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region Date: Wed, 5 Apr 2017 10:41:45 -0500 Message-ID: <003001d2ae23$21e8f7d0$65bae770$@opengridcomputing.com> MIME-Version: 1.0 Content-Language: en-us List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: 'Sagi Grimberg' , 'Logan Gunthorpe' , 'Christoph Hellwig' , "'James E.J. Bottomley'" , "'Martin K. Petersen'" , 'Jens Axboe' , 'Stephen Bates' , 'Max Gurtovoy' , 'Dan Williams' , 'Keith Busch' , 'Jason Gunthorpe' Cc: linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org List-ID: > > > > +static void setup_memwin_p2pmem(struct adapter *adap) > > +{ > > + unsigned int mem_base = t4_read_reg(adap, > CIM_EXTMEM2_BASE_ADDR_A); > > + unsigned int mem_size = t4_read_reg(adap, > CIM_EXTMEM2_ADDR_SIZE_A); > > + > > + if (!use_p2pmem) > > + return; > > This is weird, why even call this if !use_p2pmem? > The use_p2pmem was added after the original change. I'll update as you suggest. > > +static int init_p2pmem(struct adapter *adapter) > > +{ > > + unsigned int mem_size = t4_read_reg(adapter, > CIM_EXTMEM2_ADDR_SIZE_A); > > + struct p2pmem_dev *p; > > + int rc; > > + struct resource res; > > + > > + if (!mem_size || !use_p2pmem) > > + return 0; > > Again, weird... Yup. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm