ACPI / utils: Drop error messages from acpi_evaluate_reference()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 12 Dec 2014 21:51:01 +0000 (22:51 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 12 Dec 2014 21:51:01 +0000 (22:51 +0100)
Some of the error messages printed by acpi_evaluate_reference()
with the KERN_ERR priority should really be debug messages, but then
they would be redundant, because acpi_util_eval_error() is called
too at the same spots (except for one).

Drop the kernel messages from there entirely and leave the
acpi_util_eval_error() to handle the debug printing.  In one case,
replace the kernel message with a call to acpi_util_eval_error().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/utils.c

index 371ac12d25b16ee4c651649a147c7e3e9f9fdc87..5512309d167bddfa930ea384aca6aa7661ce96d7 100644 (file)
@@ -347,22 +347,16 @@ acpi_evaluate_reference(acpi_handle handle,
        package = buffer.pointer;
 
        if ((buffer.length == 0) || !package) {
-               printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
-                           (unsigned)buffer.length, package);
                status = AE_BAD_DATA;
                acpi_util_eval_error(handle, pathname, status);
                goto end;
        }
        if (package->type != ACPI_TYPE_PACKAGE) {
-               printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n",
-                           package->type);
                status = AE_BAD_DATA;
                acpi_util_eval_error(handle, pathname, status);
                goto end;
        }
        if (!package->package.count) {
-               printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n",
-                           package);
                status = AE_BAD_DATA;
                acpi_util_eval_error(handle, pathname, status);
                goto end;
@@ -381,17 +375,13 @@ acpi_evaluate_reference(acpi_handle handle,
 
                if (element->type != ACPI_TYPE_LOCAL_REFERENCE) {
                        status = AE_BAD_DATA;
-                       printk(KERN_ERR PREFIX
-                                   "Expecting a [Reference] package element, found type %X\n",
-                                   element->type);
                        acpi_util_eval_error(handle, pathname, status);
                        break;
                }
 
                if (!element->reference.handle) {
-                       printk(KERN_WARNING PREFIX "Invalid reference in"
-                              " package %s\n", pathname);
                        status = AE_NULL_ENTRY;
+                       acpi_util_eval_error(handle, pathname, status);
                        break;
                }
                /* Get the  acpi_handle. */