Convert PRINT_DEBUG(DB_ERROR/WARNING,...) to ACPI_ERROR/WARNING
Subsystems (3)
This patch lets all ACPI errors and warnings be printed even ACPI_DEBUG is disabled.
I removed all "proc entry could not be created" messages and returned -ENODEV.
I also removed all "Error removing/adding notify handler" messages.
I will provide a second patch (ACPICA) and add a message to the add/remove_handler function itself.
This should give the "non kernel debuggers" a chance to figure out why their xy hardware does not work without the need of recompiling kernels. And should provide as with better bug reports...
This one is on top of Len's latest 2.6.16-rc1/2 push.
Thomas
Subject: Enables important ACPI errors even ACPI_DEBUG is not set.
Lets all ACPI errors and warnings be printed
even ACPI_DEBUG is disabled.
ac.c | 12 +-------- acpi_memhotplug.c | 64 +++++++++++++++++++------------------------------ battery.c | 31 ++++++----------------- bus.c | 22 +++++++--------- button.c | 18 +++---------- container.c | 2 - debug.c | 5 --- ec.c | 13 +++------ event.c | 5 --- fan.c | 7 +---- hotkey.c | 38 ++++++----------------------- osl.c | 8 +++--- pci_bind.c | 50 +++++++++++++++++++------------------- pci_irq.c | 20 ++++++--------- pci_link.c | 48 ++++++++++++++++-------------------- pci_root.c | 15 ++++++----- power.c | 22 +++++++--------- processor_core.c | 59 +++++++++++++++++++-------------------------- processor_idle.c | 14 +++------- processor_perflib.c | 37 +++++++++++----------------- processor_thermal.c | 10 +++---- processor_throttling.c | 2 - scan.c | 7 ++--- system.c | 3 -- thermal.c | 58 ++++++++++++++------------------------------ utils.c | 50 ++++++++++++++++++-------------------- video.c | 54 ++++++++++++-----------------------------
drivers/acpi/ac.c +2 -10
@@ -91,8 +91,7 @@ static int acpi_ac_get_state(struct acpi status =acpi_evaluate_integer (ac->handle,"_PSR" ,NULL , &ac->state);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error reading AC Adapter state\n" )); +ACPI_ERROR ((AE_INFO ,"Error reading AC Adapter state\n" )); ac->state =ACPI_AC_STATUS_UNKNOWN ;return_VALUE (-ENODEV ); }
@@ -159,9 +158,7 @@ static int acpi_ac_add_fs(struct acpi_de entry =create_proc_entry (ACPI_AC_FILE_STATE ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_AC_FILE_STATE )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_ac_fops; entry->data =acpi_driver_data (device);
@@ -249,8 +246,6 @@ static int acpi_ac_add(struct acpi_devicACPI_DEVICE_NOTIFY , acpi_ac_notify, ac);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error installing notify handler\n" )); result = -ENODEV ; goto end; }
@@ -282,9 +277,6 @@ static int acpi_ac_remove(struct acpi_de status =acpi_remove_notify_handler (ac->handle,ACPI_DEVICE_NOTIFY , acpi_ac_notify); -if (ACPI_FAILURE (status)) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error removing notify handler\n" ));acpi_ac_remove_fs (device);
drivers/acpi/acpi_memhotplug.c +26 -38
173 lines not on this page · raw message
drivers/acpi/battery.c +9 -22
@@ -141,7 +141,7 @@ acpi_battery_get_info(struct acpi_batter status =acpi_evaluate_object (battery->handle,"_BIF" ,NULL , &buffer);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _BIF\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _BIF\n" ));return_VALUE (-ENODEV ); }
@@ -151,7 +151,7 @@ acpi_battery_get_info(struct acpi_batter status =acpi_extract_package (package, &format, &data);if (status !=AE_BUFFER_OVERFLOW ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error extracting _BIF\n" )); +ACPI_ERROR ((AE_INFO ,"Error extracting _BIF\n" )); result = -ENODEV ; goto end; }
@@ -165,7 +165,7 @@ acpi_battery_get_info(struct acpi_batter status =acpi_extract_package (package, &format, &data);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error extracting _BIF\n" )); +ACPI_ERROR ((AE_INFO ,"Error extracting _BIF\n" ));kfree (data.pointer); result = -ENODEV ; goto end;
@@ -202,7 +202,7 @@ acpi_battery_get_status(struct acpi_batt status =acpi_evaluate_object (battery->handle,"_BST" ,NULL , &buffer);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _BST\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _BST\n" ));return_VALUE (-ENODEV ); }
@@ -212,7 +212,7 @@ acpi_battery_get_status(struct acpi_batt status =acpi_extract_package (package, &format, &data);if (status !=AE_BUFFER_OVERFLOW ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error extracting _BST\n" )); +ACPI_ERROR ((AE_INFO ,"Error extracting _BST\n" )); result = -ENODEV ; goto end; }
@@ -226,7 +226,7 @@ acpi_battery_get_status(struct acpi_batt status =acpi_extract_package (package, &format, &data);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error extracting _BST\n" )); +ACPI_ERROR ((AE_INFO ,"Error extracting _BST\n" ));kfree (data.pointer); result = -ENODEV ; goto end;
@@ -458,8 +458,6 @@ static int acpi_battery_read_state(strucif ((bst->state &0x01 ) && (bst->state &0x02 )) {seq_printf (seq,"charging state: charging/discharging\n" ); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Battery Charging and Discharging?\n" )); }else if (bst->state &0x01 )seq_printf (seq,"charging state: discharging\n" );else if (bst->state &0x02 )
@@ -609,9 +607,7 @@ static int acpi_battery_add_fs(struct ac entry =create_proc_entry (ACPI_BATTERY_FILE_INFO ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_BATTERY_FILE_INFO )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_battery_info_ops; entry->data =acpi_driver_data (device);
@@ -622,9 +618,7 @@ static int acpi_battery_add_fs(struct ac entry =create_proc_entry (ACPI_BATTERY_FILE_STATUS ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_BATTERY_FILE_STATUS )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_battery_state_ops; entry->data =acpi_driver_data (device);
@@ -636,9 +630,7 @@ static int acpi_battery_add_fs(struct acS_IFREG |S_IRUGO |S_IWUSR , acpi_device_dir(device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_BATTERY_FILE_ALARM )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_battery_alarm_ops; entry->data =acpi_driver_data (device);
@@ -732,8 +724,6 @@ static int acpi_battery_add(struct acpi_ACPI_DEVICE_NOTIFY , acpi_battery_notify, battery);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error installing notify handler\n" )); result = -ENODEV ; goto end; }
@@ -766,9 +756,6 @@ static int acpi_battery_remove(struct ac status =acpi_remove_notify_handler (battery->handle,ACPI_DEVICE_NOTIFY , acpi_battery_notify); -if (ACPI_FAILURE (status)) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error removing notify handler\n" ));acpi_battery_remove_fs (device);
drivers/acpi/bus.c +10 -12
@@ -69,8 +69,7 @@ int acpi_bus_get_device(acpi_handle hand status =acpi_get_data (handle, acpi_bus_data_handler, (void **)device);if (ACPI_FAILURE (status) || !*device) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN ,"No context for object [%p]\n" , - handle)); +ACPI_WARNING ((AE_INFO ,"No context for object [%p]\n" , handle));return_VALUE (-ENODEV ); }
@@ -197,8 +196,7 @@ int acpi_bus_set_power(acpi_handle handl/* Make sure this is a valid target state */ if (!device->flags.power_manageable) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Device is not power manageable\n" )); +ACPI_INFO ((AE_INFO ,"Device is not power manageable\n" ));return_VALUE (-ENODEV ); }/*
@@ -213,13 +211,13 @@ int acpi_bus_set_power(acpi_handle handlreturn_VALUE (0 ); }if (!device->power.states[state].flags.valid) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN ,"Device does not support D%d\n" , - state)); +ACPI_WARNING ((AE_INFO ,"Device does not support D%d\n" , state));return_VALUE (-ENODEV ); }if (device->parent && (state < device->parent->power.state)) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Cannot set device to a higher-powered state than parent\n" )); +ACPI_WARNING ((AE_INFO , +"Cannot set device to a higher-powered" +" state than parent\n" ));return_VALUE (-ENODEV ); }
@@ -262,9 +260,9 @@ int acpi_bus_set_power(acpi_handle handl end:if (result) -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Error transitioning device [%s] to D%d\n" , - device->pnp.bus_id, state)); +ACPI_WARNING ((AE_INFO , +"Error transitioning device [%s] to D%d\n" , + device->pnp.bus_id, state));else ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] transitioned to D%d\n",
@@ -579,7 +577,7 @@ static int __init acpi_bus_init_irq(void status =acpi_evaluate_object (NULL ,"\\_PIC" , &arg_list,NULL );if (ACPI_FAILURE (status) && (status !=AE_NOT_FOUND )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PIC\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PIC\n" ));return_VALUE (-ENODEV ); }
drivers/acpi/button.c +4 -14
@@ -207,9 +207,7 @@ static int acpi_button_add_fs(struct acp entry =create_proc_entry (ACPI_BUTTON_FILE_INFO ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_BUTTON_FILE_INFO )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_button_info_fops; entry->data =acpi_driver_data (device);
@@ -221,9 +219,7 @@ static int acpi_button_add_fs(struct acp entry =create_proc_entry (ACPI_BUTTON_FILE_STATE ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_BUTTON_FILE_INFO )); +return -ENODEV ;else { entry->proc_fops = &acpi_button_state_fops; entry->data =acpi_driver_data (device);
@@ -349,8 +345,8 @@ static int acpi_button_add(struct acpi_dsprintf (acpi_device_class (device),"%s/%s" ,ACPI_BUTTON_CLASS ,ACPI_BUTTON_SUBCLASS_LID ); }else { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Unsupported hid [%s]\n" , -acpi_device_hid (device))); +ACPI_ERROR ((AE_INFO ,"Unsupported hid [%s]\n" , +acpi_device_hid (device))); result = -ENODEV ; goto end; }
@@ -381,8 +377,6 @@ static int acpi_button_add(struct acpi_d }if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error installing notify handler\n" )); result = -ENODEV ; goto end; }
@@ -440,10 +434,6 @@ static int acpi_button_remove(struct acpbreak ; } -if (ACPI_FAILURE (status)) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error removing notify handler\n" )); -acpi_button_remove_fs (device);kfree (button);
drivers/acpi/container.c +1 -1
@@ -94,7 +94,7 @@ static int acpi_container_add(struct acpACPI_FUNCTION_TRACE ("acpi_container_add" );if (!device) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"device is NULL\n" )); +ACPI_ERROR ((AE_INFO ,"device is NULL\n" ));return_VALUE (-EINVAL ); }
drivers/acpi/debug.c +1 -4
@@ -216,12 +216,9 @@ static int __init acpi_debug_init(void)return_VALUE (error); Error: -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' proc fs entry\n" , name)); -remove_proc_entry (ACPI_SYSTEM_FILE_DEBUG_LEVEL , acpi_root_dir);remove_proc_entry (ACPI_SYSTEM_FILE_DEBUG_LAYER , acpi_root_dir); - error = -EFAULT ; + error = -ENODEV ; goto Done; }
drivers/acpi/ec.c +4 -9
@@ -957,9 +957,7 @@ static int acpi_ec_add_fs(struct acpi_de entry =create_proc_entry (ACPI_EC_FILE_INFO ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Unable to create '%s' fs entry\n" , -ACPI_EC_FILE_INFO )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_ec_info_ops; entry->data =acpi_driver_data (device);
@@ -1034,8 +1032,7 @@ static int acpi_ec_poll_add(struct acpi_acpi_evaluate_integer (ec->common.handle,"_GPE" ,NULL , &ec->common.gpe_bit);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error obtaining GPE bit assignment\n" )); +ACPI_ERROR ((AE_INFO ,"Error obtaining GPE bit assignment\n" )); result = -ENODEV ; goto end; }
@@ -1108,8 +1105,7 @@ static int acpi_ec_intr_add(struct acpi_acpi_evaluate_integer (ec->common.handle,"_GPE" ,NULL , &ec->common.gpe_bit);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error obtaining GPE bit assignment\n" )); +ACPI_ERROR ((AE_INFO ,"Error obtaining GPE bit assignment\n" )); result = -ENODEV ; goto end; }
@@ -1203,8 +1199,7 @@ static int acpi_ec_start(struct acpi_dev acpi_ec_io_ports, ec);if (ACPI_FAILURE (status) || ec->common.command_addr.register_bit_width ==0 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error getting I/O port addresses" )); +ACPI_ERROR ((AE_INFO ,"Error getting I/O port addresses" ));return_VALUE (-ENODEV ); }
drivers/acpi/event.c +1 -4
@@ -122,10 +122,7 @@ static int __init acpi_event_init(void)if (entry) entry->proc_fops = &acpi_system_event_ops;else { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' proc fs entry\n" , -"event" )); - error = -EFAULT ; + error = -ENODEV ; }return_VALUE (error); }
drivers/acpi/fan.c +2 -5
@@ -149,9 +149,7 @@ static int acpi_fan_add_fs(struct acpi_dS_IFREG |S_IRUGO |S_IWUSR , acpi_device_dir(device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_FAN_FILE_STATE )); +return_VALUE (-ENODEV );else { entry->proc_fops = &acpi_fan_state_ops; entry->data =acpi_driver_data (device);
@@ -201,8 +199,7 @@ static int acpi_fan_add(struct acpi_devi result =acpi_bus_get_power (fan->handle, &state);if (result) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error reading power state\n" )); +ACPI_ERROR ((AE_INFO ,"Error reading power state\n" )); goto end; }
drivers/acpi/hotkey.c +9 -29
@@ -356,9 +356,6 @@ static int create_polling_proc(union acp proc =create_proc_entry (proc_name, mode, hotkey_proc_dir);if (!proc) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Hotkey: Unable to create %s entry\n" , - device->poll_hotkey.poll_method));return_VALUE (-ENODEV ); }else { proc->proc_fops = &hotkey_polling_fops;
@@ -769,7 +766,7 @@ static ssize_t hotkey_write_config(strucif (copy_from_user (config_record, buffer, count)) {kfree (config_record); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid data \n" )); +ACPI_ERROR ((AE_INFO ,"Invalid data \n" ));return_VALUE (-EINVAL ); } config_record[count] =0 ;
@@ -790,8 +787,7 @@ static ssize_t hotkey_write_config(struckfree (bus_method);kfree (action_handle);kfree (method); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Invalid data format ret=%d\n" , ret)); +ACPI_ERROR ((AE_INFO ,"Invalid data format ret=%d\n" , ret));return_VALUE (-EINVAL ); }
@@ -804,7 +800,7 @@ static ssize_t hotkey_write_config(struc tmp =get_hotkey_by_event (&global_hotkey_list, internal_event_num);if (!tmp) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid key" )); +ACPI_ERROR ((AE_INFO ,"Invalid key" ));else memcpy (key, tmp,sizeof (union acpi_hotkey )); goto cont_cmd;
@@ -826,7 +822,7 @@ static ssize_t hotkey_write_config(strucelse free_poll_hotkey_buffer (key);kfree (key); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid hotkey \n" )); +ACPI_ERROR ((AE_INFO ,"Invalid hotkey \n" ));return_VALUE (-EINVAL ); }
@@ -860,7 +856,7 @@ static ssize_t hotkey_write_config(strucelse free_poll_hotkey_buffer (key);kfree (key); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"invalid key\n" )); +ACPI_ERROR ((AE_INFO ,"invalid key\n" ));return_VALUE (-EINVAL ); }
@@ -905,7 +901,7 @@ static int read_acpi_int(acpi_handle han val->integer.value = out_obj.integer.value; val->type = out_obj.type; }else -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"null val pointer" )); +ACPI_ERROR ((AE_INFO ,"null val pointer" ));return_VALUE ((status ==AE_OK ) && (out_obj.type ==ACPI_TYPE_INTEGER )); }
@@ -952,14 +948,14 @@ static ssize_t hotkey_execute_aml_methodif (copy_from_user (arg, buffer, count)) {kfree (arg); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid argument 2" )); +ACPI_ERROR ((AE_INFO ,"Invalid argument 2" ));return_VALUE (-EINVAL ); }if (sscanf (arg,"%d:%d:%d:%d" , &event, &method_type, &type, &value) !=4 ) {kfree (arg); -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid argument 3" )); +ACPI_ERROR ((AE_INFO ,"Invalid argument 3" ));return_VALUE (-EINVAL ); }kfree (arg);
@@ -985,7 +981,7 @@ static ssize_t hotkey_execute_aml_method } }else { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Not supported" )); +ACPI_ERROR ((AE_INFO ,"Not supported" ));return_VALUE (-EINVAL ); }return_VALUE (count);
@@ -1011,9 +1007,6 @@ static int __init hotkey_init(void) hotkey_proc_dir =proc_mkdir (HOTKEY_PROC , acpi_root_dir);if (!hotkey_proc_dir) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Hotkey: Unable to create %s entry\n" , -HOTKEY_PROC ));return (-ENODEV ); } hotkey_proc_dir->owner =THIS_MODULE ;
@@ -1021,9 +1014,6 @@ static int __init hotkey_init(void) hotkey_config =create_proc_entry (HOTKEY_EV_CONFIG , mode, hotkey_proc_dir);if (!hotkey_config) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Hotkey: Unable to create %s entry\n" , -HOTKEY_EV_CONFIG )); goto do_fail1; }else { hotkey_config->proc_fops = &hotkey_config_fops;
@@ -1036,10 +1026,6 @@ static int __init hotkey_init(void) hotkey_poll_config =create_proc_entry (HOTKEY_PL_CONFIG , mode, hotkey_proc_dir);if (!hotkey_poll_config) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Hotkey: Unable to create %s entry\n" , -HOTKEY_EV_CONFIG )); - goto do_fail2; }else { hotkey_poll_config->proc_fops = &hotkey_poll_config_fops;
@@ -1051,9 +1037,6 @@ static int __init hotkey_init(void) hotkey_action =create_proc_entry (HOTKEY_ACTION , mode, hotkey_proc_dir);if (!hotkey_action) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Hotkey: Unable to create %s entry\n" , -HOTKEY_ACTION )); goto do_fail3; }else { hotkey_action->proc_fops = &hotkey_action_fops;
@@ -1064,9 +1047,6 @@ static int __init hotkey_init(void) hotkey_info =create_proc_entry (HOTKEY_INFO , mode, hotkey_proc_dir);if (!hotkey_info) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Hotkey: Unable to create %s entry\n" , -HOTKEY_INFO )); goto do_fail4; }else { hotkey_info->proc_fops = &hotkey_info_fops;
drivers/acpi/osl.c +4 -4
@@ -700,7 +700,7 @@ static void acpi_os_execute_deferred(voi dpc = (struct acpi_os_dpc *)context;if (!dpc) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid (NULL) context.\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid (NULL) context.\n" )); return_VOID; }
@@ -752,8 +752,8 @@ acpi_os_queue_for_execution(u32 priorityINIT_WORK (task, acpi_os_execute_deferred, (void *)dpc);if (!queue_work (kacpid_wq, task)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Call to queue_work() failed.\n" )); +ACPI_ERROR ((AE_INFO , +"Call to queue_work() failed.\n" ));kfree (dpc); status =AE_ERROR ; }
@@ -927,7 +927,7 @@ acpi_status acpi_os_wait_semaphore(acpi_ }if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , +ACPI_WARNING ((AE_INFO ,"Failed to acquire semaphore[%p|%d|%d], %s\n" , handle, units, timeout,acpi_format_exception (status)));
drivers/acpi/pci_bind.c +25 -25
97 lines not on this page · raw message
drivers/acpi/pci_irq.c +9 -11
@@ -197,8 +197,8 @@ int acpi_pci_irq_add_prt(acpi_handle hankfree (pathname); status =acpi_get_irq_routing_table (handle, &buffer);if (status !=AE_BUFFER_OVERFLOW ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PRT [%s]\n" , -acpi_format_exception (status))); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PRT [%s]\n" , +acpi_format_exception (status)));return_VALUE (-ENODEV ); }
@@ -211,8 +211,8 @@ int acpi_pci_irq_add_prt(acpi_handle han status =acpi_get_irq_routing_table (handle, &buffer);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PRT [%s]\n" , -acpi_format_exception (status))); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PRT [%s]\n" , +acpi_format_exception (status)));kfree (buffer.pointer);return_VALUE (-ENODEV ); }
@@ -269,8 +269,8 @@ acpi_pci_allocate_irq(struct acpi_prt_en entry->link.index, triggering, polarity, link);if (irq <0 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Invalid IRQ link routing entry\n" )); +ACPI_WARNING ((AE_INFO , +"Invalid IRQ link routing entry\n" ));return_VALUE (-1 ); } }else {
@@ -379,9 +379,8 @@ acpi_pci_irq_derive(struct pci_dev *dev, }if (irq <0 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Unable to derive IRQ for device %s\n" , -pci_name (dev))); +ACPI_WARNING ((AE_INFO ,"Unable to derive IRQ for device %s\n" , +pci_name (dev)));return_VALUE (-1 ); }
@@ -421,8 +420,7 @@ int acpi_pci_irq_enable(struct pci_dev * pin--;if (!dev->bus) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Invalid (NULL) 'bus' field\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid (NULL) 'bus' field\n" ));return_VALUE (-ENODEV ); }
drivers/acpi/pci_link.c +22 -26
176 lines not on this page · raw message
drivers/acpi/pci_root.c +8 -7
@@ -198,7 +198,7 @@ static int acpi_pci_root_add(struct acpi root->id.segment =0 ;break ;default : -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _SEG\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _SEG\n" )); result = -ENODEV ; goto end; }
@@ -219,7 +219,7 @@ static int acpi_pci_root_add(struct acpi root->id.bus =0 ;break ;default : -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _BBN\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _BBN\n" )); result = -ENODEV ; goto end; }
@@ -231,8 +231,9 @@ static int acpi_pci_root_add(struct acpiint bus =0 ;acpi_status status; -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Wrong _BBN value, please reboot and using option 'pci=noacpi'\n" )); +ACPI_ERROR ((AE_INFO , +"Wrong _BBN value, please reboot" +" and using option 'pci=noacpi'\n" )); status =try_get_root_bridge_busnr (root->handle, &bus);if (ACPI_FAILURE (status))
@@ -273,9 +274,9 @@ static int acpi_pci_root_add(struct acpi*/ root->bus =pci_acpi_scan_root (device, root->id.segment, root->id.bus);if (!root->bus) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Bus %04x:%02x not present in PCI namespace\n" , - root->id.segment, root->id.bus)); +ACPI_ERROR ((AE_INFO , +"Bus %04x:%02x not present in PCI namespace\n" , + root->id.segment, root->id.bus)); result = -ENODEV ; goto end; }
drivers/acpi/power.c +10 -12
@@ -105,8 +105,8 @@ acpi_power_get_context(acpi_handle handl result =acpi_bus_get_device (handle, &device);if (result) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN ,"Error getting context [%p]\n" , - handle)); +ACPI_WARNING ((AE_INFO ,"Getting context [%p]\n" , + handle));return_VALUE (result); }
@@ -292,7 +292,7 @@ int acpi_enable_wakeup_device_power(strufor (i =0 ; i < dev->wakeup.resources.count; i++) { ret =acpi_power_on (dev->wakeup.resources.handles[i]);if (ret) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , +ACPI_ERROR ((AE_INFO ,"Error transition power state\n" )); dev->wakeup.flags.valid =0 ;return_VALUE (-1 );
@@ -302,7 +302,7 @@ int acpi_enable_wakeup_device_power(stru/* Execute PSW */ status =acpi_evaluate_object (dev->handle,"_PSW" , &arg_list,NULL );if (ACPI_FAILURE (status) && (status !=AE_NOT_FOUND )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluate _PSW\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluate _PSW\n" )); dev->wakeup.flags.valid =0 ; ret =-1 ; }
@@ -332,7 +332,7 @@ int acpi_disable_wakeup_device_power(str/* Execute PSW */ status =acpi_evaluate_object (dev->handle,"_PSW" , &arg_list,NULL );if (ACPI_FAILURE (status) && (status !=AE_NOT_FOUND )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluate _PSW\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluate _PSW\n" )); dev->wakeup.flags.valid =0 ;return_VALUE (-1 ); }
@@ -341,7 +341,7 @@ int acpi_disable_wakeup_device_power(strfor (i =0 ; i < dev->wakeup.resources.count; i++) { ret =acpi_power_off_device (dev->wakeup.resources.handles[i]);if (ret) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , +ACPI_ERROR ((AE_INFO ,"Error transition power state\n" )); dev->wakeup.flags.valid =0 ;return_VALUE (-1 );
@@ -444,9 +444,9 @@ int acpi_power_transition(struct acpi_de device->power.state = state; end:if (result) -ACPI_DEBUG_PRINT ((ACPI_DB_WARN , -"Error transitioning device [%s] to D%d\n" , - device->pnp.bus_id, state)); +ACPI_WARNING ((AE_INFO , +"Transitioning device [%s] to D%d\n" , + device->pnp.bus_id, state));return_VALUE (result); }
@@ -516,9 +516,7 @@ static int acpi_power_add_fs(struct acpi entry =create_proc_entry (ACPI_POWER_FILE_STATUS ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_POWER_FILE_STATUS )); +return_VALUE (-EIO );else { entry->proc_fops = &acpi_power_fops; entry->data =acpi_driver_data (device);
drivers/acpi/processor_core.c +25 -34
146 lines not on this page · raw message
drivers/acpi/processor_idle.c +5 -9
@@ -663,8 +663,7 @@ static int acpi_processor_get_power_info/* There must be at least 2 elements */ if (!cst || (cst->type !=ACPI_TYPE_PACKAGE ) || cst->package.count <2 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"not enough elements in _CST\n" )); +ACPI_ERROR ((AE_INFO ,"not enough elements in _CST\n" )); status = -EFAULT ; goto end; }
@@ -673,8 +672,7 @@ static int acpi_processor_get_power_info/* Validate number of power states. */ if (count <1 || count != cst->package.count -1 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"count given by _CST is not valid\n" )); +ACPI_ERROR ((AE_INFO ,"count given by _CST is not valid\n" )); status = -EFAULT ; goto end; }
@@ -1094,8 +1092,8 @@ int acpi_processor_power_init(struct acp status =acpi_os_write_port (acpi_fadt.smi_cmd, acpi_fadt.cst_cnt,8 );if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Notifying BIOS of _CST ability failed\n" )); +ACPI_ERROR ((AE_INFO , +"Notifying BIOS of _CST ability failed\n" )); } }
@@ -1124,9 +1122,7 @@ int acpi_processor_power_init(struct acp entry =create_proc_entry (ACPI_PROCESSOR_FILE_POWER ,S_IRUGO ,acpi_device_dir (device));if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_PROCESSOR_FILE_POWER )); +return -EIO ;else { entry->proc_fops = &acpi_processor_power_fops; entry->data =acpi_driver_data (device);
drivers/acpi/processor_perflib.c +15 -22
@@ -122,7 +122,7 @@ static int acpi_processor_get_platform_l acpi_processor_ppc_status |=PPC_IN_USE ;if (ACPI_FAILURE (status) && status !=AE_NOT_FOUND ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PPC\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PPC\n" ));return_VALUE (-ENODEV ); }
@@ -171,14 +171,14 @@ static int acpi_processor_get_performanc status =acpi_evaluate_object (pr->handle,"_PCT" ,NULL , &buffer);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PCT\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PCT\n" ));return_VALUE (-ENODEV ); } pct = (union acpi_object *)buffer.pointer;if (!pct || (pct->type !=ACPI_TYPE_PACKAGE ) || (pct->package.count !=2 )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid _PCT data\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid _PCT data\n" )); result = -EFAULT ; goto end; }
@@ -192,8 +192,7 @@ static int acpi_processor_get_performancif ((obj.type !=ACPI_TYPE_BUFFER ) || (obj.buffer.length <sizeof (struct acpi_pct_register )) || (obj.buffer.pointer ==NULL )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Invalid _PCT data (control_register)\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid _PCT data (control_register)\n" )); result = -EFAULT ; goto end; }
@@ -209,8 +208,7 @@ static int acpi_processor_get_performancif ((obj.type !=ACPI_TYPE_BUFFER ) || (obj.buffer.length <sizeof (struct acpi_pct_register )) || (obj.buffer.pointer ==NULL )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Invalid _PCT data (status_register)\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid _PCT data (status_register)\n" )); result = -EFAULT ; goto end; }
@@ -238,13 +236,13 @@ static int acpi_processor_get_performanc status =acpi_evaluate_object (pr->handle,"_PSS" ,NULL , &buffer);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PSS\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PSS\n" ));return_VALUE (-ENODEV ); } pss = (union acpi_object *)buffer.pointer;if (!pss || (pss->type !=ACPI_TYPE_PACKAGE )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid _PSS data\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid _PSS data\n" )); result = -EFAULT ; goto end; }
@@ -273,8 +271,7 @@ static int acpi_processor_get_performanc status =acpi_extract_package (&(pss->package.elements[i]), &format, &state);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Invalid _PSS data\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid _PSS data\n" )); result = -EFAULT ;kfree (pr->performance->states); goto end;
@@ -290,8 +287,8 @@ static int acpi_processor_get_performanc (u32) px->control, (u32) px->status));if (!px->core_frequency) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Invalid _PSS data: freq is zero\n" )); +ACPI_ERROR ((AE_INFO , +"Invalid _PSS data: freq is zero\n" )); result = -EFAULT ;kfree (pr->performance->states); goto end;
@@ -386,10 +383,10 @@ int acpi_processor_notify_smm(struct mod status =acpi_os_write_port (acpi_fadt.smi_cmd, (u32 ) acpi_fadt.pstate_cnt,8 );if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Failed to write pstate_cnt [0x%x] to " -"smi_cmd [0x%x]\n" , acpi_fadt.pstate_cnt, - acpi_fadt.smi_cmd)); +ACPI_ERROR ((AE_INFO , +"Failed to write pstate_cnt [0x%x] to " +"smi_cmd [0x%x]\n" , acpi_fadt.pstate_cnt, + acpi_fadt.smi_cmd));module_put (calling_module);return_VALUE (status); }
@@ -513,11 +510,7 @@ static void acpi_cpufreq_add_file(struct entry =create_proc_entry (ACPI_PROCESSOR_FILE_PERFORMANCE ,S_IFREG |S_IRUGO |S_IWUSR ,acpi_device_dir (device)); -if (!entry) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' fs entry\n" , -ACPI_PROCESSOR_FILE_PERFORMANCE )); -else { +if (entry) acpi_processor_perf_fops.write = acpi_processor_write_performance; entry->proc_fops = &acpi_processor_perf_fops; entry->data =acpi_driver_data (device);
drivers/acpi/processor_thermal.c +4 -6
@@ -82,7 +82,7 @@ static int acpi_processor_apply_limit(st end:if (result) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Unable to set limit\n" )); +ACPI_ERROR ((AE_INFO ,"Unable to set limit\n" ));return_VALUE (result); }
@@ -289,7 +289,7 @@ int acpi_processor_set_thermal_limit(acp result =acpi_processor_apply_limit (pr);if (result) -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , +ACPI_ERROR ((AE_INFO ,"Unable to set thermal limit\n" )); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
@@ -362,25 +362,23 @@ static ssize_t acpi_processor_write_limiACPI_FUNCTION_TRACE ("acpi_processor_write_limit" );if (!pr || (count >sizeof (limit_string) -1 )) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid argument\n" ));return_VALUE (-EINVAL ); }if (copy_from_user (limit_string, buffer, count)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid data\n" ));return_VALUE (-EFAULT ); } limit_string[count] ='\0' ;if (sscanf (limit_string,"%d:%d" , &px, &tx) !=2 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid data format\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid data format\n" ));return_VALUE (-EINVAL ); }if (pr->flags.throttling) {if ((tx <0 ) || (tx > (pr->throttling.state_count -1 ))) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Invalid tx\n" )); +ACPI_ERROR ((AE_INFO ,"Invalid tx\n" ));return_VALUE (-EINVAL ); } pr->limit.user.tx = tx;
drivers/acpi/processor_throttling.c +1 -1
@@ -196,7 +196,7 @@ int acpi_processor_get_throttling_info(s }/* TBD: Support duty_cycle values that span bit 4. */ else if ((pr->throttling.duty_offset + pr->throttling.duty_width) >4 ) { -ACPI_DEBUG_PRINT ((ACPI_DB_WARN ,"duty_cycle spans bit 4\n" )); +ACPI_WARNING ((AE_INFO ,"duty_cycle spans bit 4\n" ));return_VALUE (0 ); }
drivers/acpi/scan.c +3 -4
@@ -321,15 +321,14 @@ static int acpi_bus_get_wakeup_device_fl/* _PRW */ status =acpi_evaluate_object (device->handle,"_PRW" ,NULL , &buffer);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Error evaluating _PRW\n" )); +ACPI_ERROR ((AE_INFO ,"Error evaluating _PRW\n" )); goto end; } package = (union acpi_object *)buffer.pointer; status =acpi_bus_extract_wakeup_device_power_package (device, package);if (ACPI_FAILURE (status)) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Error extracting _PRW package\n" )); +ACPI_ERROR ((AE_INFO ,"Error extracting _PRW package\n" )); goto end; }
@@ -1001,7 +1000,7 @@ acpi_add_single_object(struct acpi_devic device =kmalloc (sizeof (struct acpi_device ),GFP_KERNEL );if (!device) { -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"Memory allocation error\n" )); +ACPI_ERROR ((AE_INFO ,"Memory allocation error\n" ));return_VALUE (-ENOMEM ); }memset (device,0 ,sizeof (struct acpi_device ));
drivers/acpi/thermal.c +19 -39
165 lines not on this page · raw message
drivers/acpi/utils.c +24 -26
109 lines not on this page · raw message
drivers/acpi/video.c +16 -38
173 lines not on this page · raw message
drivers/acpi/system.c +0 -3
@@ -161,9 +161,6 @@ static int __init acpi_system_init(void)return_VALUE (error); Error: -ACPI_DEBUG_PRINT ((ACPI_DB_ERROR , -"Unable to create '%s' proc fs entry\n" , name)); -remove_proc_entry (ACPI_SYSTEM_FILE_FADT , acpi_root_dir);remove_proc_entry (ACPI_SYSTEM_FILE_DSDT , acpi_root_dir);remove_proc_entry (ACPI_SYSTEM_FILE_INFO , acpi_root_dir);