From patchwork Wed Jan 28 10:57:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 5731951 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A5AC49F1AF for ; Wed, 28 Jan 2015 21:58:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F26C5201F2 for ; Wed, 28 Jan 2015 21:58:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3717A20142 for ; Wed, 28 Jan 2015 21:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758210AbbA1U1Z (ORCPT ); Wed, 28 Jan 2015 15:27:25 -0500 Received: from mga09.intel.com ([134.134.136.24]:20892 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754041AbbA1U1T (ORCPT ); Wed, 28 Jan 2015 15:27:19 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 28 Jan 2015 02:51:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,480,1418112000"; d="scan'208";a="677268739" Received: from gerry-dev.bj.intel.com ([10.238.158.52]) by orsmga002.jf.intel.com with ESMTP; 28 Jan 2015 02:55:03 -0800 From: Jiang Liu To: "Rafael J. Wysocki" , Thomas Gleixner , Bjorn Helgaas , Yinghai Lu , Borislav Petkov , Lv Zheng , Len Brown Cc: Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, Jiang Liu Subject: [Patch v2 02/22] ACPI: Remove redundant check in function acpi_dev_resource_address_space() Date: Wed, 28 Jan 2015 18:57:20 +0800 Message-Id: <1422442660-455-3-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1422442660-455-1-git-send-email-jiang.liu@linux.intel.com> References: <1422442660-455-1-git-send-email-jiang.liu@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 From: Thomas Gleixner The ACPI type is checked in acpi_resource_to_address64() anyway. Signed-off-by: Thomas Gleixner Signed-off-by: Jiang Liu --- drivers/acpi/resource.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index d0a4d90c6bcc..1c616a56e007 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -189,15 +189,6 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares, u64 len; u8 io_decode; - switch (ares->type) { - case ACPI_RESOURCE_TYPE_ADDRESS16: - case ACPI_RESOURCE_TYPE_ADDRESS32: - case ACPI_RESOURCE_TYPE_ADDRESS64: - break; - default: - return false; - } - status = acpi_resource_to_address64(ares, &addr); if (ACPI_FAILURE(status)) return false;