From patchwork Fri Sep 6 17:14:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2854585 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 31B1F9F494 for ; Fri, 6 Sep 2013 17:14:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23903202C3 for ; Fri, 6 Sep 2013 17:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45C3C202C7 for ; Fri, 6 Sep 2013 17:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753644Ab3IFROW (ORCPT ); Fri, 6 Sep 2013 13:14:22 -0400 Received: from mail-ye0-f181.google.com ([209.85.213.181]:45704 "EHLO mail-ye0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605Ab3IFROV (ORCPT ); Fri, 6 Sep 2013 13:14:21 -0400 Received: by mail-ye0-f181.google.com with SMTP id r14so389996yen.40 for ; Fri, 06 Sep 2013 10:14:21 -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:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=k8AnYRYe3VSIz1KPUchNV3ZY8cHUULg7LpMuYynpUI8=; b=PJRU8f9LH1vbQy1d+h3q8GI7Dkrwdo2SoSZD4X28FBGkFbV1tLBLTUhYzVkyys8Hib 2ux9jKOMuRvGTF6X3rNIwx1uGOhj7KI5p6ZWY8bZS39vNkJ99siUQaVTbGNbbDQjC6Ls /z4W/hk2c7U6hFJIbIsxTwcCo4Vi/Hp7eyM5/8b6Y1cyjIE6nyyL4gRv1EOgc0C8EeyU 5fh510/AheD912ZtAIr9EE8fceQ8iRInKdGX6gdpOgVDpV7NezHspTM7GLL+71jnbVd/ ahpGM1L09RYp9n3l7IiscGxdd5ZKaj21xnugAJOIRk5jWpqlHUeGpxoOp9D+Iq6PZpRi 2m7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=k8AnYRYe3VSIz1KPUchNV3ZY8cHUULg7LpMuYynpUI8=; b=jfdly0uCtnlghBCYdDslNqu0ic6phGLFqF4Me506HVRS4M16sR4KUFBV2PRSDzRG3r ZUrBI/zt7SlbG9e8SSuzP/B2KFKYNSwJaj9rIMMlBvZujPqzvC0bxdQHO3X/iqsr6KMe 01dH7OTsRaqo48K0tZ+6kByczI0dp1UaGlSYdUBEmqi9U+hx5WljPpE1p1/oYS18g+/L ELMkkEHn3QzNdeEcAmw8QmwK7dVrP3jsDiZdfNHJ/iunbbvZ3LogKZDCcXrIGxGNPkYE T+z2A2BXvUKg2Yr18w4d48R4/xHULPJKzi9yVoTFsuNVdhkXaXt8j2JBB03o3iwStFmi KdJA== X-Gm-Message-State: ALoCoQneU3oKBYOfVdSeJNDd/zYepbhMgr7CtzRNrSu+hOz7aP6tJ8FSxfNTnOKiBjlKcWKHhs4JXJ09cVY0kgRHVYuKlr5YIEvV9x0eg1T9YSiPvmCgIjGmhjyZReccUM5TGazd5JSMon3wSUiHHc6orv8jEqYC5L1hJhYtUSpQEIiiV0P3OjuJzZpzFAgbYnI09FKDyRb5rO6JdRs9aYoBSEbCiVNhg5sMAeE2eDzNvZ2XBVnR36I= X-Received: by 10.236.148.138 with SMTP id v10mr3093883yhj.27.1378487661328; Fri, 06 Sep 2013 10:14:21 -0700 (PDT) Received: from localhost ([172.16.53.165]) by mx.google.com with ESMTPSA id x29sm4093855yhd.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 06 Sep 2013 10:14:20 -0700 (PDT) Subject: [PATCH 07/14] PCI/ACPI: Drop unnecessary _OSC existence tests To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Len Brown Date: Fri, 06 Sep 2013 11:14:18 -0600 Message-ID: <20130906171418.11482.83703.stgit@bhelgaas-glaptop> In-Reply-To: <20130906171010.11482.34235.stgit@bhelgaas-glaptop> References: <20130906171010.11482.34235.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There's no need to check whether _OSC exists here; we eventually call acpi_evaluate_object(..., "_OSC", ...), and that will fail gracefully if _OSC doesn't exist. Signed-off-by: Bjorn Helgaas --- drivers/acpi/pci_root.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" 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/pci_root.c b/drivers/acpi/pci_root.c index 28dd555..cc87cc4 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -180,11 +180,7 @@ static acpi_status acpi_pci_query_osc(struct acpi_pci_root *root, static acpi_status acpi_pci_osc_support(struct acpi_pci_root *root, u32 flags) { acpi_status status; - acpi_handle tmp; - status = acpi_get_handle(root->device->handle, "_OSC", &tmp); - if (ACPI_FAILURE(status)) - return status; mutex_lock(&osc_lock); status = acpi_pci_query_osc(root, flags, NULL); mutex_unlock(&osc_lock); @@ -316,9 +312,8 @@ EXPORT_SYMBOL_GPL(acpi_get_pci_dev); acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req) { struct acpi_pci_root *root; - acpi_status status; + acpi_status status = AE_OK; u32 ctrl, capbuf[3]; - acpi_handle tmp; if (!mask) return AE_BAD_PARAMETER; @@ -331,10 +326,6 @@ acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req) if (!root) return AE_NOT_EXIST; - status = acpi_get_handle(handle, "_OSC", &tmp); - if (ACPI_FAILURE(status)) - return status; - mutex_lock(&osc_lock); *mask = ctrl | root->osc_control_set;