Commit 52352fbb authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] fix return values for ACPI_FUNCTION_TRACE

http://bugzilla.kernel.org/show_bug.cgi?id=3336Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 41057cbb
......@@ -117,11 +117,11 @@ int acpi_ac_seq_show(struct seq_file *seq, void *offset)
ACPI_FUNCTION_TRACE("acpi_ac_seq_show");
if (!ac)
return 0;
return_VALUE(0);
if (acpi_ac_get_state(ac)) {
seq_puts(seq, "ERROR: Unable to read AC Adapter state\n");
return 0;
return_VALUE(0);
}
seq_puts(seq, "state: ");
......@@ -137,7 +137,7 @@ int acpi_ac_seq_show(struct seq_file *seq, void *offset)
break;
}
return 0;
return_VALUE(0);
}
static int acpi_ac_open_fs(struct inode *inode, struct file *file)
......@@ -212,7 +212,7 @@ acpi_ac_notify (
ACPI_FUNCTION_TRACE("acpi_ac_notify");
if (!ac)
return;
return_VOID;
if (acpi_bus_get_device(ac->handle, &device))
return_VOID;
......
......@@ -332,7 +332,7 @@ acpi_bus_receive_event (
ACPI_FUNCTION_TRACE("acpi_bus_receive_event");
if (!event)
return -EINVAL;
return_VALUE(-EINVAL);
if (list_empty(&acpi_bus_event_list)) {
......@@ -599,7 +599,7 @@ acpi_early_init (void)
ACPI_FUNCTION_TRACE("acpi_early_init");
if (acpi_disabled)
return;
return_VOID;
/* enable workarounds, unless strict ACPI spec. compliance */
if (!acpi_strict)
......@@ -652,11 +652,11 @@ acpi_early_init (void)
goto error0;
}
return;
return_VOID;
error0:
disable_acpi();
return;
return_VOID;
}
static int __init
......@@ -743,7 +743,7 @@ static int __init acpi_init (void)
if (acpi_disabled) {
printk(KERN_INFO PREFIX "Interpreter disabled.\n");
return -ENODEV;
return_VALUE(-ENODEV);
}
firmware_register(&acpi_subsys);
......
......@@ -116,12 +116,12 @@ static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
ACPI_FUNCTION_TRACE("acpi_button_info_seq_show");
if (!button || !button->device)
return 0;
return_VALUE(0);
seq_printf(seq, "type: %s\n",
acpi_device_name(button->device));
return 0;
return_VALUE(0);
}
static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
......@@ -138,7 +138,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
ACPI_FUNCTION_TRACE("acpi_button_state_seq_show");
if (!button || !button->device)
return 0;
return_VALUE(0);
status = acpi_evaluate_integer(button->handle,"_LID",NULL,&state);
if (ACPI_FAILURE(status)) {
......@@ -148,7 +148,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
seq_printf(seq, "state: %s\n", (state ? "open" : "closed"));
}
return 0;
return_VALUE(0);
}
static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
......
......@@ -62,7 +62,7 @@ acpi_reserve_io_ranges (struct acpi_resource *res, void *data)
struct acpi_resource_io *io_res = &res->data.io;
if (io_res->min_base_address != io_res->max_base_address)
return AE_OK;
return_VALUE(AE_OK);
if (IS_RESERVED_ADDR(io_res->min_base_address, io_res->range_length)) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Motherboard resources 0x%08x - 0x%08x\n",
io_res->min_base_address,
......@@ -86,7 +86,7 @@ acpi_reserve_io_ranges (struct acpi_resource *res, void *data)
if (requested_res)
requested_res->flags &= ~IORESOURCE_BUSY;
return AE_OK;
return_VALUE(AE_OK);
}
static int acpi_motherboard_add (struct acpi_device *device)
......
......@@ -110,13 +110,13 @@ acpi_pci_link_check_possible (
switch (resource->id) {
case ACPI_RSTYPE_START_DPF:
return AE_OK;
return_ACPI_STATUS(AE_OK);
case ACPI_RSTYPE_IRQ:
{
struct acpi_resource_irq *p = &resource->data.irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank IRQ resource\n"));
return AE_OK;
return_ACPI_STATUS(AE_OK);
}
for (i = 0; (i<p->number_of_interrupts && i<ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
if (!p->interrupts[i]) {
......@@ -137,7 +137,7 @@ acpi_pci_link_check_possible (
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank EXT IRQ resource\n"));
return AE_OK;
return_ACPI_STATUS(AE_OK);
}
for (i = 0; (i<p->number_of_interrupts && i<ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
if (!p->interrupts[i]) {
......@@ -155,10 +155,10 @@ acpi_pci_link_check_possible (
default:
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Resource is not an IRQ entry\n"));
return AE_OK;
return_ACPI_STATUS(AE_OK);
}
return AE_CTRL_TERMINATE;
return_ACPI_STATUS(AE_CTRL_TERMINATE);
}
......@@ -207,7 +207,7 @@ acpi_pci_link_check_current (
*/
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Blank IRQ resource\n"));
return AE_OK;
return_ACPI_STATUS(AE_OK);
}
*irq = p->interrupts[0];
break;
......@@ -222,7 +222,7 @@ acpi_pci_link_check_current (
*/
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank EXT IRQ resource\n"));
return AE_OK;
return_ACPI_STATUS(AE_OK);
}
*irq = p->interrupts[0];
break;
......@@ -230,9 +230,9 @@ acpi_pci_link_check_current (
default:
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Resource isn't an IRQ\n"));
return AE_OK;
return_ACPI_STATUS(AE_OK);
}
return AE_CTRL_TERMINATE;
return_ACPI_STATUS(AE_CTRL_TERMINATE);
}
/*
......@@ -816,14 +816,14 @@ __setup("acpi_irq_pci=", acpi_irq_pci);
static int __init acpi_irq_nobalance_set(char *str)
{
acpi_irq_balance = 0;
return(1);
return 1;
}
__setup("acpi_irq_nobalance", acpi_irq_nobalance_set);
int __init acpi_irq_balance_set(char *str)
{
acpi_irq_balance = 1;
return(1);
return 1;
}
__setup("acpi_irq_balance", acpi_irq_balance_set);
......
......@@ -303,7 +303,7 @@ int acpi_enable_wakeup_device_power (struct acpi_device *dev)
ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device_power");
if (!dev || !dev->wakeup.flags.valid)
return -1;
return_VALUE(-1);
arg.integer.value = 1;
/* Open power resource */
......@@ -313,7 +313,7 @@ int acpi_enable_wakeup_device_power (struct acpi_device *dev)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error transition power state\n"));
dev->wakeup.flags.valid = 0;
return -1;
return_VALUE(-1);
}
}
......@@ -325,7 +325,7 @@ int acpi_enable_wakeup_device_power (struct acpi_device *dev)
ret = -1;
}
return ret;
return_VALUE(ret);
}
/*
......@@ -344,7 +344,7 @@ int acpi_disable_wakeup_device_power (struct acpi_device *dev)
ACPI_FUNCTION_TRACE("acpi_disable_wakeup_device_power");
if (!dev || !dev->wakeup.flags.valid)
return -1;
return_VALUE(-1);
arg.integer.value = 0;
/* Execute PSW */
......@@ -352,7 +352,7 @@ int acpi_disable_wakeup_device_power (struct acpi_device *dev)
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n"));
dev->wakeup.flags.valid = 0;
return -1;
return_VALUE(-1);
}
/* Close power resource */
......@@ -362,11 +362,11 @@ int acpi_disable_wakeup_device_power (struct acpi_device *dev)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error transition power state\n"));
dev->wakeup.flags.valid = 0;
return -1;
return_VALUE(-1);
}
}
return ret;
return_VALUE(ret);
}
/* --------------------------------------------------------------------------
......@@ -513,7 +513,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
resource->references);
end:
return 0;
return_VALUE(0);
}
static int acpi_power_open_fs(struct inode *inode, struct file *file)
......
......@@ -1135,7 +1135,7 @@ static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
(u32) pr->performance->states[i].transition_latency);
end:
return 0;
return_VALUE(0);
}
static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file)
......@@ -1860,7 +1860,7 @@ static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset)
pr->flags.limit ? "yes" : "no");
end:
return 0;
return_VALUE(0);
}
static int acpi_processor_info_open_fs(struct inode *inode, struct file *file)
......@@ -1915,7 +1915,7 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
}
end:
return 0;
return_VALUE(0);
}
static int acpi_processor_power_open_fs(struct inode *inode, struct file *file)
......@@ -1959,7 +1959,7 @@ static int acpi_processor_throttling_seq_show(struct seq_file *seq, void *offset
(pr->throttling.states[i].performance?pr->throttling.states[i].performance/10:0));
end:
return 0;
return_VALUE(0);
}
static int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file)
......@@ -2020,7 +2020,7 @@ static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset)
pr->limit.thermal.px, pr->limit.thermal.tx);
end:
return 0;
return_VALUE(0);
}
static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file)
......
......@@ -158,7 +158,7 @@ acpi_bus_get_power_flags (
device->power.state = ACPI_STATE_UNKNOWN;
return 0;
return_VALUE(0);
}
int
......@@ -278,7 +278,7 @@ acpi_bus_get_wakeup_device_flags (
end:
if (ACPI_FAILURE(status))
device->flags.wake_capable = 0;
return 0;
return_VALUE(0);
}
/* --------------------------------------------------------------------------
......
......@@ -226,7 +226,7 @@ acpi_thermal_get_temperature (
status = acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature);
if (ACPI_FAILURE(status))
return -ENODEV;
return_VALUE(-ENODEV);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", tz->temperature));
......@@ -328,7 +328,7 @@ acpi_thermal_get_trip_points (
if (ACPI_FAILURE(status)) {
tz->trips.critical.flags.valid = 0;
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No critical threshold\n"));
return -ENODEV;
return_VALUE(-ENODEV);
}
else {
tz->trips.critical.flags.valid = 1;
......@@ -799,7 +799,7 @@ static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset)
}
end:
return 0;
return_VALUE(0);
}
static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file)
......@@ -826,7 +826,7 @@ static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset)
KELVIN_TO_CELSIUS(tz->temperature));
end:
return 0;
return_VALUE(0);
}
static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
......@@ -879,7 +879,7 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
}
end:
return 0;
return_VALUE(0);
}
static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file)
......@@ -958,7 +958,7 @@ static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset)
tz->cooling_mode?"passive":"active");
end:
return 0;
return_VALUE(0);
}
static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file)
......@@ -1021,7 +1021,7 @@ static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset)
(tz->polling_frequency / 10));
end:
return 0;
return_VALUE(0);
}
static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file)
......
......@@ -373,7 +373,7 @@ acpi_evaluate_reference (
}
if (package->package.count > ACPI_MAX_HANDLES) {
return AE_NO_MEMORY;
return_ACPI_STATUS(AE_NO_MEMORY);
}
list->count = package->package.count;
......
......@@ -1670,7 +1670,7 @@ acpi_video_bus_put_one_device(
ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device");
if (!device || !device->video)
return (-ENOENT);
return_VALUE(-ENOENT);
video = device->video;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment