Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device
From: Sinan Kaya <hidden>
Date: 2017-03-31 18:49:08
Also in:
linux-nvme, linux-pci, linux-scsi, lkml, nvdimm
From: Sinan Kaya <hidden>
Date: 2017-03-31 18:49:08
Also in:
linux-nvme, linux-pci, linux-scsi, lkml, nvdimm
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.