Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4382402ybf; Wed, 4 Mar 2020 02:54:37 -0800 (PST) X-Google-Smtp-Source: ADFU+vv46Qz1yNtTlQB2tP2bHElle4A3SloGdHaNO/R/3T8SfNvtQ3o69WiLvxFzRaSsqoae6AlM X-Received: by 2002:a05:6830:19ec:: with SMTP id t12mr213354ott.161.1583319277029; Wed, 04 Mar 2020 02:54:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583319277; cv=none; d=google.com; s=arc-20160816; b=BTMuhXLVhXK5wNu9dc7XbE4APskUIp44hM3BCsj3DUDwDQMpbXCC+xBU7ghyuO3Mvk QqtNGMgqZtxgM+64NLzI0WiKRtmZa9YcI2Y+LdhqdAl8KfzMDr08pSJ+u2B45KAgH6iC x3cacw8IVIlM8svxnYs4WITO0cACZd3yn99oJdKqdn2iepqsZJfqCzOLY/cf9z7c7oV4 GTHRBf0MnRZv9VenbLhM+p+xg2wOUKv6OaOG4xSCERYxM22FMMfaUIXZ/libO0f1R/Rn oLb/p4AZEC7wfNVQB3zLA9ZbHqXsQbto1pNynnVfKXoNkxtNxMH1bjNMml8+hNoiP+py KcVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5NJM+Y8EDX5DfJjw+YOSPp4SMj5/u4056Vru7TPK0BM=; b=AWmiSEOotqOmxp0JIcZNdY/mXTCHnZvguEuLnANFgfqJrSW//Ab8McfWR0TXVbXDAF kD7D2J9qRR71IHUC4azH+uwGSVIuS7/psAUe2Fi+dM70PVSMBjqX11lzry9Jw5Wur5Bf 6nsx4IWI5kazfdB/elbzzPCD5ZirKfaibGTzPxgEd4El0/vL7qBXuJkZ9WQlszOPleC4 BNIlZcGcpMNFcMXpAcjtMbxhSyfbTDG3mXjhbK4Oeflky529/8SJBZDu5Bgk/eR+K9Kh Yhoe95KuA1DKn7VTDN77kxl47ffmN8GzG72tLPo5is4KCMA1sJqqcxlruispe4Xfl2AY 0JiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si840039otq.157.2020.03.04.02.54.25; Wed, 04 Mar 2020 02:54:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387972AbgCDKxM (ORCPT + 99 others); Wed, 4 Mar 2020 05:53:12 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:64290 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387707AbgCDKw4 (ORCPT ); Wed, 4 Mar 2020 05:52:56 -0500 Received: from 79.184.237.41.ipv4.supernova.orange.pl (79.184.237.41) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.341) id 2b9b5be4e094f220; Wed, 4 Mar 2020 11:52:54 +0100 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , "Rafael J. Wysocki" , Daniel Drake , Jian-Hong Pan Subject: [PATCH v2 3/6] ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers() Date: Wed, 04 Mar 2020 11:46:31 +0100 Message-ID: <1745425.pKipCqq21V@kreacher> In-Reply-To: <2411774.6kdisLRoUK@kreacher> References: <2094703.CetWLLyMuz@kreacher> <2411774.6kdisLRoUK@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Rafael J. Wysocki" If the status value returned by acpi_install_address_space_handler() in ec_install_handlers() is AE_NOT_FOUND, it is treated in a special way, apparently because it might mean a _REG method evaluation failure (at least that is the case according to the comment in there), but acpi_install_address_space_handler() does not take _REG evaluation errors into account at all, so the AE_NOT_FOUND special handling is confusing at best. For this reason, change ec_install_handlers() to stop the EC and return -ENODEV on all acpi_install_address_space_handler() errors. Signed-off-by: Rafael J. Wysocki --- -> v2: No changes. --- drivers/acpi/ec.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 3153e7684053..6f501d552e6e 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1489,19 +1489,8 @@ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device) &acpi_ec_space_handler, NULL, ec); if (ACPI_FAILURE(status)) { - if (status == AE_NOT_FOUND) { - /* - * Maybe OS fails in evaluating the _REG - * object. The AE_NOT_FOUND error will be - * ignored and OS * continue to initialize - * EC. - */ - pr_err("Fail in evaluating the _REG object" - " of EC device. Broken bios is suspected.\n"); - } else { - acpi_ec_stop(ec, false); - return -ENODEV; - } + acpi_ec_stop(ec, false); + return -ENODEV; } set_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags); } -- 2.16.4