All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch 1/2]:ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver
@ 2009-07-07  2:55 yakui
  2009-08-02 16:27 ` Len Brown
  0 siblings, 1 reply; 3+ messages in thread
From: yakui @ 2009-07-07  2:55 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

From: Zhao Yakui <yakui.zhao@intel.com>

Don't regard the generic error as ACPI error code. Otherwise when the generic
code is returned, it will complain the following warning messag:
   >ACPI Exception (acpi_memhotplug-0171): UNKNOWN_STATUS_CODE, 
		Cannot get acpi bus device [20080609]
   >ACPI: Cannot find driver data
   > ACPI Error (utglobal-0127): Unknown exception code: 0xFFFFFFED [20080609]
   > Pid: 85, comm: kacpi_notify Not tainted 2.6.27.19-5-default #1
     Call Trace:
     [<ffffffff8020da29>] show_trace_log_lvl+0x41/0x58
     [<ffffffff8049a3da>] dump_stack+0x69/0x6f
    .....

At the same time when the generic error code is returned, the ACPI_EXCEPTION
is replaced by the printk.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/acpi_memhotplug.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Index: linux-2.6/drivers/acpi/acpi_memhotplug.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpi_memhotplug.c	2009-07-06 13:32:36.000000000 +0800
+++ linux-2.6/drivers/acpi/acpi_memhotplug.c	2009-07-07 10:33:43.000000000 +0800
@@ -38,6 +38,9 @@
 
 #define _COMPONENT		ACPI_MEMORY_DEVICE_COMPONENT
 
+#undef PREFIX
+#define 	PREFIX		"ACPI:memory_hp:"
+
 ACPI_MODULE_NAME("acpi_memhotplug");
 MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
 MODULE_DESCRIPTION("Hotplug Mem Driver");
@@ -153,6 +156,7 @@
 	acpi_handle phandle;
 	struct acpi_device *device = NULL;
 	struct acpi_device *pdevice = NULL;
+	int result;
 
 
 	if (!acpi_bus_get_device(handle, &device) && device)
@@ -165,9 +169,10 @@
 	}
 
 	/* Get the parent device */
-	status = acpi_bus_get_device(phandle, &pdevice);
-	if (ACPI_FAILURE(status)) {
-		ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device"));
+	result = acpi_bus_get_device(phandle, &pdevice);
+	if (result) {
+		printk(KERN_WARNING PREFIX "Cannot get acpi bus device, "
+						"ret = %d\n", result);
 		return -EINVAL;
 	}
 
@@ -175,9 +180,10 @@
 	 * Now add the notified device.  This creates the acpi_device
 	 * and invokes .add function
 	 */
-	status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
-	if (ACPI_FAILURE(status)) {
-		ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus"));
+	result = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
+	if (result) {
+		printk(KERN_WARNING PREFIX "Cannot add acpi bus, "
+						"ret = %d\n", result);
 		return -EINVAL;
 	}
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch 1/2]:ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver
  2009-07-07  2:55 [Patch 1/2]:ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver yakui
@ 2009-08-02 16:27 ` Len Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Len Brown @ 2009-08-02 16:27 UTC (permalink / raw)
  To: yakui; +Cc: linux-acpi

applied

thanks,
Len Brown, Intel Open Source Technology Center



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Patch 1/2]:ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver
@ 2009-07-03  2:49 yakui
  0 siblings, 0 replies; 3+ messages in thread
From: yakui @ 2009-07-03  2:49 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

From: Zhao Yakui <yakui.zhao@intel.com>

Don't treat the generic error as ACPI error code. Otherwise when the generic
code is returned, it will complain the following warning messag:
   >ACPI Exception (acpi_memhotplug-0171): UNKNOWN_STATUS_CODE, 
		Cannot get acpi bus device [20080609]
   >ACPI: Cannot find driver data
   > ACPI Error (utglobal-0127): Unknown exception code: 0xFFFFFFED [20080609]
   > Pid: 85, comm: kacpi_notify Not tainted 2.6.27.19-5-default #1
     Call Trace:
     [<ffffffff8020da29>] show_trace_log_lvl+0x41/0x58
     [<ffffffff8049a3da>] dump_stack+0x69/0x6f
    .....

At the same time when the generic error code is returned, the ACPI_EXCEPTION
is replaced by the printk.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/acpi_memhotplug.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Index: linux-2.6/drivers/acpi/acpi_memhotplug.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpi_memhotplug.c	2009-07-01 11:40:21.000000000 +0800
+++ linux-2.6/drivers/acpi/acpi_memhotplug.c	2009-07-03 10:47:52.000000000 +0800
@@ -38,6 +38,9 @@
 
 #define _COMPONENT		ACPI_MEMORY_DEVICE_COMPONENT
 
+#undef PREFIX
+#define 	PREFIX		"ACPI:memory_hp:"
+
 ACPI_MODULE_NAME("acpi_memhotplug");
 MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
 MODULE_DESCRIPTION("Hotplug Mem Driver");
@@ -153,6 +156,7 @@
 	acpi_handle phandle;
 	struct acpi_device *device = NULL;
 	struct acpi_device *pdevice = NULL;
+	int result;
 
 
 	if (!acpi_bus_get_device(handle, &device) && device)
@@ -165,9 +169,9 @@
 	}
 
 	/* Get the parent device */
-	status = acpi_bus_get_device(phandle, &pdevice);
-	if (ACPI_FAILURE(status)) {
-		ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device"));
+	result = acpi_bus_get_device(phandle, &pdevice);
+	if (result) {
+		printk(KERN_WARNING PREFIX "Cannot get acpi bus device");
 		return -EINVAL;
 	}
 
@@ -175,9 +179,9 @@
 	 * Now add the notified device.  This creates the acpi_device
 	 * and invokes .add function
 	 */
-	status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
-	if (ACPI_FAILURE(status)) {
-		ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus"));
+	result = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
+	if (result) {
+		printk(KERN_WARNING PREFIX "Cannot add acpi bus");
 		return -EINVAL;
 	}
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-02 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-07  2:55 [Patch 1/2]:ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver yakui
2009-08-02 16:27 ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03  2:49 yakui

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.