Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754387AbdCaStI (ORCPT ); Fri, 31 Mar 2017 14:49:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47310 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752076AbdCaStG (ORCPT ); Fri, 31 Mar 2017 14:49:06 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9584160FA9 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device To: Logan Gunthorpe , Christoph Hellwig , Sagi Grimberg , "James E.J. Bottomley" , "Martin K. Petersen" , Jens Axboe , Steve Wise , Stephen Bates , Max Gurtovoy , Dan Williams , Keith Busch , Jason Gunthorpe References: <1490911959-5146-1-git-send-email-logang@deltatee.com> <1490911959-5146-2-git-send-email-logang@deltatee.com> Cc: linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org From: Sinan Kaya Message-ID: Date: Fri, 31 Mar 2017 14:49:01 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1490911959-5146-2-git-send-email-logang@deltatee.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 832 Lines: 35 Hi Logan, > +/** > + * p2pmem_unregister() - unregister a p2pmem device > + * @p: the device to unregister > + * > + * The device will remain until all users are done with it > + */ > +void p2pmem_unregister(struct p2pmem_dev *p) > +{ > + if (!p) > + return; > + > + dev_info(&p->dev, "unregistered"); > + device_del(&p->dev); > + ida_simple_remove(&p2pmem_ida, p->id); Don't you need to clean up the p->pool here. > + put_device(&p->dev); > +} > +EXPORT_SYMBOL(p2pmem_unregister); > + I don't like the ugliness around the switch port to be honest. Going to whitelist/blacklist looks simpler in my opinion. Sinan -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.