Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755728Ab2FZJRA (ORCPT ); Tue, 26 Jun 2012 05:17:00 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:47590 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754670Ab2FZJQ6 (ORCPT ); Tue, 26 Jun 2012 05:16:58 -0400 X-IronPort-AV: E=Sophos;i="4.77,476,1336320000"; d="scan'208";a="5266078" Message-ID: <4FE97F13.3000804@cn.fujitsu.com> Date: Tue, 26 Jun 2012 17:21:23 +0800 From: Wen Congyang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: lenb@kernel.org, linux-acpi@vger.kernel.org, "linux-kernel@vger.kernel.org" CC: Yasuaki ISIMATU Subject: [PATCH 5/8] don't print message if request_resource() failed References: <4FE97DD5.6030205@cn.fujitsu.com> In-Reply-To: <4FE97DD5.6030205@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/06/26 17:17:09, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/06/26 17:17:11, Serialize complete at 2012/06/26 17:17:11 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 32 If register_memory_resource() fails, the caller(add_memory()) will return -EEXIST, and add_memory() returns -EEXIST only when register_memory_resource() fails. The function acpi_memory_enable_device() doesn't treat such erro as a fetal error, and don't want this message. The function that calls add_memory() has printed message if add_memory() failed, so don't print message in register_memory_resource(). Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 0d7e3ec..2a14d35 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -74,7 +74,6 @@ static struct resource *register_memory_resource(u64 start, u64 size) res->end = start + size - 1; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; if (request_resource(&iomem_resource, res) < 0) { - printk("System RAM resource %pR cannot be added\n", res); kfree(res); res = NULL; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/