From patchwork Mon Jun 3 18:20:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2654211 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9A02ADF24C for ; Mon, 3 Jun 2013 18:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759549Ab3FCSU1 (ORCPT ); Mon, 3 Jun 2013 14:20:27 -0400 Received: from mail-ie0-f178.google.com ([209.85.223.178]:43437 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759544Ab3FCSU1 (ORCPT ); Mon, 3 Jun 2013 14:20:27 -0400 Received: by mail-ie0-f178.google.com with SMTP id f4so11351161iea.37 for ; Mon, 03 Jun 2013 11:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=Sns9ueaCD2w43jO8VV+U2I8oU7ygEoiDkyrg8NVrXSQ=; b=kbN4LuUrV9KqZwcETOTRx0zXv/wfWAPyswBHrmvNaWmTjqy7U5ufBTxK9zSoqjuInU GJgoWPjnD2skuoHvIP7nqPoYqSTHH+d0uHFQNB3GI5jU2UoXQBO2EflCafQ3Wmxk+t7k umyAIDnJagTLulcnyirHP3MFY3MiXxa23NGkblrxlDFHh/MGtR0orVqbBGl7b2NQ5zug hR8gDxHTKc2lJQcBEJwv2vayFeB96vg4BZZps4SzqGIVh4aNSClrjsDizIzkA8337y+w d/mRopKYLrOnaGO3mt+afXRbuJNeUzZQhASfepV79nPfS5nv6YDOdyQxfhf9q+DjlZhl +Zgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding:x-gm-message-state; bh=Sns9ueaCD2w43jO8VV+U2I8oU7ygEoiDkyrg8NVrXSQ=; b=ZFCpIWwsyXb5jBP0PmlxUmmCz6a9oLTbdRoOTJVpliIE8I9W94KxFVfrnC7FEah4VH 9R0gI5RRgDBYw8CUghhFrg6t/azS++mwAd/4CJWr1N5JRESxy2hMAwtnhGspRU/47WBO FPBU8zLEDVspaU6AupO76+NGDNAOJixk9e2fDpcBvWzzj4ovQVUhI68cPy2D59VLdwY9 7q5q/5JnLYLL4zLJCaEAaEb5qWBavAGU3cfGQleiJKVdF1JEa4tEuIXAqs3dYsrQVtF4 /r9eSAY3cwHHSzYAtLl+yO6lKpnTR8psZKscPYiBerOcXiM242StRJlGpB+JyiE2ldWs rM9A== X-Received: by 10.50.132.9 with SMTP id oq9mr8630630igb.40.1370283626624; Mon, 03 Jun 2013 11:20:26 -0700 (PDT) Received: from localhost ([172.16.55.72]) by mx.google.com with ESMTPSA id ot10sm14388621igb.9.2013.06.03.11.20.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Jun 2013 11:20:26 -0700 (PDT) Subject: [PATCH] ACPI: Remove useless initializers To: "Rafael J. Wysocki" , Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org Date: Mon, 03 Jun 2013 12:20:24 -0600 Message-ID: <20130603182024.16039.34089.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkF5rZ0Me7cqBAQaNFMyaXPH3B2SF2K0bU2DGcOZgOX8/OB3gNS6rUYIJIpRSTPpxNZ5CtF11/D9Ya16zgavkfu1bSZ6WkTfHeLxzUWYpZpmlq2AMoHzqx1nyhxs9QU8k8HJqJ0hJaHUauWYSxpx7IrK5Jbjs8Zr3pUsCxzi/X28czotOpcQ6+kgz0/gC3QnGEwu/trxkbCs1h2TnyFgo02FJhVEw== Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org These local variables are all initialized at their first use, so there's no point in initializing them earlier. Signed-off-by: Bjorn Helgaas --- drivers/acpi/bus.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 292de3c..a5bb33b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -91,8 +91,7 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = { int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device) { - acpi_status status = AE_OK; - + acpi_status status; if (!device) return -EINVAL; @@ -162,7 +161,7 @@ EXPORT_SYMBOL(acpi_bus_private_data_handler); int acpi_bus_get_private_data(acpi_handle handle, void **data) { - acpi_status status = AE_OK; + acpi_status status; if (!*data) return -EINVAL; @@ -361,7 +360,7 @@ extern int event_is_open; int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data) { struct acpi_bus_event *event; - unsigned long flags = 0; + unsigned long flags; /* drop event on the floor if no one's listening */ if (!event_is_open) @@ -400,7 +399,7 @@ EXPORT_SYMBOL(acpi_bus_generate_proc_event); int acpi_bus_receive_event(struct acpi_bus_event *event) { - unsigned long flags = 0; + unsigned long flags; struct acpi_bus_event *entry = NULL; DECLARE_WAITQUEUE(wait, current); @@ -593,7 +592,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) static int __init acpi_bus_init_irq(void) { - acpi_status status = AE_OK; + acpi_status status; union acpi_object arg = { ACPI_TYPE_INTEGER }; struct acpi_object_list arg_list = { 1, &arg }; char *message = NULL; @@ -640,7 +639,7 @@ u8 acpi_gbl_permanent_mmap; void __init acpi_early_init(void) { - acpi_status status = AE_OK; + acpi_status status; if (acpi_disabled) return; @@ -714,8 +713,8 @@ void __init acpi_early_init(void) static int __init acpi_bus_init(void) { - int result = 0; - acpi_status status = AE_OK; + int result; + acpi_status status; extern acpi_status acpi_os_initialize1(void); acpi_os_initialize1();