All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] memory-hotplug-dont-bug-in-register_memory_resource-v2.patch removed from -mm tree
@ 2016-01-14 22:30 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-01-14 22:30 UTC (permalink / raw)
  To: vkuznets, dan.j.williams, david.vrabel, imammedo, n-horiguchi,
	qiuxishi, rientjes, shengyong1, tangchen, zhugh.fnst, mm-commits


The patch titled
     Subject: memory-hotplug-dont-bug-in-register_memory_resource-v2
has been removed from the -mm tree.  Its filename was
     memory-hotplug-dont-bug-in-register_memory_resource-v2.patch

This patch was dropped because it was folded into memory-hotplug-dont-bug-in-register_memory_resource.patch

------------------------------------------------------
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: memory-hotplug-dont-bug-in-register_memory_resource-v2

Changes since v1:
- Use ERR_PTR/PTR_ERR/IS_ERR() [David Rientjes]

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Sheng Yong <shengyong1@huawei.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memory_hotplug.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff -puN mm/memory_hotplug.c~memory-hotplug-dont-bug-in-register_memory_resource-v2 mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~memory-hotplug-dont-bug-in-register_memory_resource-v2
+++ a/mm/memory_hotplug.c
@@ -127,13 +127,12 @@ void mem_hotplug_done(void)
 }
 
 /* add this memory to iomem resource */
-static int register_memory_resource(u64 start, u64 size,
-				    struct resource **resource)
+static struct resource *register_memory_resource(u64 start, u64 size)
 {
 	struct resource *res;
 	res = kzalloc(sizeof(struct resource), GFP_KERNEL);
 	if (!res)
-		return -ENOMEM;
+		return ERR_PTR(-ENOMEM);
 
 	res->name = "System RAM";
 	res->start = start;
@@ -142,10 +141,9 @@ static int register_memory_resource(u64
 	if (request_resource(&iomem_resource, res) < 0) {
 		pr_debug("System RAM resource %pR cannot be added\n", res);
 		kfree(res);
-		return -EEXIST;
+		return ERR_PTR(-EEXIST);
 	}
-	*resource = res;
-	return 0;
+	return res;
 }
 
 static void release_memory_resource(struct resource *res)
@@ -1314,9 +1312,9 @@ int __ref add_memory(int nid, u64 start,
 	struct resource *res;
 	int ret;
 
-	ret = register_memory_resource(start, size, &res);
-	if (ret)
-		return ret;
+	res = register_memory_resource(start, size);
+	if (IS_ERR(res))
+		return PTR_ERR(res);
 
 	ret = add_memory_resource(nid, res);
 	if (ret < 0)
_

Patches currently in -mm which might be from vkuznets@redhat.com are

memory-hotplug-dont-bug-in-register_memory_resource.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-14 22:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14 22:30 [folded-merged] memory-hotplug-dont-bug-in-register_memory_resource-v2.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.