===================================================================
@@ -506,6 +506,8 @@ static ssize_t acpi_processor_write_limi
}
result = acpi_processor_apply_limit(pr);
+ if (result < 0)
+ return result;
return count;
}
===================================================================
@@ -279,13 +279,10 @@ acpi_status acpi_ut_acquire_mutex(acpi_m
acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
{
- acpi_thread_id this_thread_id;
-
ACPI_FUNCTION_NAME(ut_release_mutex);
- this_thread_id = acpi_os_get_thread_id();
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Thread %p releasing Mutex [%s]\n",
- ACPI_CAST_PTR(void, this_thread_id),
+ ACPI_CAST_PTR(void, acpi_os_get_thread_id()),
acpi_ut_get_mutex_name(mutex_id)));
if (mutex_id > ACPI_MAX_MUTEX) {
===================================================================
@@ -255,12 +255,10 @@ acpi_parse_memory_affinity(struct acpi_s
static int __init acpi_parse_srat(struct acpi_table_header *table)
{
- struct acpi_table_srat *srat;
-
if (!table)
return -EINVAL;
- srat = (struct acpi_table_srat *)table;
+ /* Real work done in acpi_table_parse_srat below. */
return 0;
}
===================================================================
@@ -141,15 +141,14 @@ static struct osi_linux {
static void __init acpi_request_region (struct acpi_generic_address *addr,
unsigned int length, char *desc)
{
- struct resource *res;
-
if (!addr->address || !length)
return;
+ /* Resources are never freed */
if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
- res = request_region(addr->address, length, desc);
+ request_region(addr->address, length, desc);
else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
- res = request_mem_region(addr->address, length, desc);
+ request_mem_region(addr->address, length, desc);
}
static int __init acpi_reserve_resources(void)
===================================================================
@@ -795,13 +795,12 @@ static inline void acpi_idle_do_entry(st
} else if (cx->entry_method == ACPI_CSTATE_HALT) {
acpi_safe_halt();
} else {
- int unused;
/* IO port based C-state */
inb(cx->address);
/* Dummy wait op - must do something useless after P_LVL2 read
because chipsets cannot guarantee that STPCLK# signal
gets asserted in time to freeze execution properly. */
- unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
+ inl(acpi_gbl_FADT.xpm_timer_block.address);
}
start_critical_timings();
}
===================================================================
@@ -2140,7 +2140,7 @@ acpi_video_bus_get_devices(struct acpi_v
status = acpi_video_bus_get_one_device(dev, video);
if (ACPI_FAILURE(status)) {
printk(KERN_WARNING PREFIX
- "Cant attach device");
+ "Cant attach device\n");
continue;
}
}
@@ -2150,19 +2150,19 @@ acpi_video_bus_get_devices(struct acpi_v
static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
{
acpi_status status;
- struct acpi_video_bus *video;
-
if (!device || !device->video)
return -ENOENT;
- video = device->video;
-
acpi_video_device_remove_fs(device->dev);
status = acpi_remove_notify_handler(device->dev->handle,
ACPI_DEVICE_NOTIFY,
acpi_video_device_notify);
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_WARNING PREFIX
+ "Cant remove video notify handler\n");
+ }
if (device->backlight) {
sysfs_remove_link(&device->backlight->dev.kobj, "device");
backlight_device_unregister(device->backlight);
===================================================================
@@ -145,12 +145,6 @@ static void ata_acpi_handle_hotplug(stru
struct ata_eh_info *ehi = &ap->link.eh_info;
int wait = 0;
unsigned long flags;
- acpi_handle handle;
-
- if (dev)
- handle = dev->acpi_handle;
- else
- handle = ap->acpi_handle;
spin_lock_irqsave(ap->lock, flags);
/*
===================================================================
@@ -553,8 +553,6 @@ static int acpi_power_seq_show(struct se
int result = 0, state;
struct acpi_power_resource *resource = NULL;
struct list_head *node, *next;
- struct acpi_power_reference *ref;
-
resource = seq->private;
@@ -579,10 +577,8 @@ static int acpi_power_seq_show(struct se
}
mutex_lock(&resource->resource_lock);
- list_for_each_safe(node, next, &resource->reference) {
- ref = container_of(node, struct acpi_power_reference, node);
+ list_for_each_safe(node, next, &resource->reference)
count++;
- }
mutex_unlock(&resource->resource_lock);
seq_printf(seq, "system level: S%d\n"