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: 2854586 Return-Path: X-Original-To: patchwork-linux-acpi@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 327A29F4D5 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 15122202C7 for ; Fri, 6 Sep 2013 17:14:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23974202E8 for ; Fri, 6 Sep 2013 17:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752605Ab3IFROW (ORCPT ); Fri, 6 Sep 2013 13:14:22 -0400 Received: from mail-yh0-f52.google.com ([209.85.213.52]:33132 "EHLO mail-yh0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753009Ab3IFROW (ORCPT ); Fri, 6 Sep 2013 13:14:22 -0400 Received: by mail-yh0-f52.google.com with SMTP id v1so1341352yhn.11 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=L8l+jZTVfrP4CJ0VpixnVPQvwPkHKoWVzv3I9kzvRVscUk/VUc1cr7gZnPfTZ5gM09 gx3U/QrKexOWTbM7eF1Ll2r+U59qdeMaBX8YsREK3oh9R7cSxzI4eTRRoy4KkKNXWsXN A/EEFdrNucDqyGzWHawCzcORCzLUgD+UJpfxR/a3kgYbbGIY5dfEK9tSiNiXNha3HLdS +gPX4gAdrTDLa9nYZaoPRMmlwJAkXMLoHaIQ94Oxu3PcC3HpBfbEJGUljxl+NKFz14jS x+mxye04Oa13PbpzyDSgutKt4PB6ABmB2pwxb82qSbTq1SSkLecTuiTVa0+XKcizrKn/ NfUg== X-Gm-Message-State: ALoCoQlt01Ww5El0oGStpYAT62oa7k54yOxig9QsLeSlJitatc7ZI8vB01UNy8PKWJbMLmUmjr0zr7Y92M8U0W+yhmnCb70hoegiPbLgJ8bNtxI3uOlvo4vy7J59+4hZZXQw+BGJuI5cK0el9XygJZ0XdC63z9tlkrdra3/ykgUwNkPoeUp0SPULvQHAMLnfASXvUU6QXFBtKueW3NjUnYj+EibzXx7MjA== 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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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=unavailable 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-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/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;