Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1607889ybf; Thu, 27 Feb 2020 14:25:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyg/XtgVSnwiO5/deZ9Vz4WyIWqjbV+azz9olbSEnUoIcfrXGpMI7VbufUxnrtIuWtFATAr X-Received: by 2002:aca:c243:: with SMTP id s64mr890989oif.141.1582842342007; Thu, 27 Feb 2020 14:25:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582842342; cv=none; d=google.com; s=arc-20160816; b=ZmMmR7k1VC3GfSdZ6dI4qK456iKEKhZJUfx8iRvXzn/XwB1hfqs17LwlEfhWYDq+Bz KUkGhi64hnn3qWB7znIpg7K0W90e1RlEZ7//JFoQYnhTIjUzxpWnXhfSYQ/j4kdXTgOT vPDr+zgUWwZHrMSJVWjKpgm1RUtOoVxU64x3wee9ie9IzGSu1zEed02sAAfECz2DFs5r JY3wKn2LHQIC5aNGPdzGITY51B1aYHAdi7eItXGGfeeZr+xy9Z3Nw4jLkHc9cqe/L8eg 33eMPEM9m9MC49TBieISTwSisPOxtEPJ3/DFXa3dtpx8BKLaA90y1Y99JuV+ZCrXbLf8 I1Pg== 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=dPUU7L581ItFPgr29dvRIu35PG5VAJxdA55cqSMeYhE=; b=qZ3oRa7/SfR50D1jrKAweB7HML2Yw+l13xSMW9UsQrzzVK+B1pRCnZeKf6vL5LrIRe bGdkyKuGL9HLWySc4kN0E9zxbusb84hew+ClLOTvIgFbusxssuJIrtSZN1OG+q1STwI0 5tXu8FZzYr0imurIT4cYPPvT+hqo5Pv8YlSYx1KRmCLijr32gWj7tAE8EytHXQhT4TQ7 0XYf85uPOpL+SirL1UCN2Sosjelf31mAG2iopoLZrLo5oC27zftL35VfqV0AsXEBUL7i A7UcGV4OC6HLYDqW09URBQ5NCaX4C4XdkVu1sHwEmPZ9ehAiLyYUx5r5NQNArXtmzPyo myQA== 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 v126si716939oia.106.2020.02.27.14.25.29; Thu, 27 Feb 2020 14:25:41 -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 S1730193AbgB0WZW (ORCPT + 99 others); Thu, 27 Feb 2020 17:25:22 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:61730 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729434AbgB0WZV (ORCPT ); Thu, 27 Feb 2020 17:25:21 -0500 Received: from 79.184.237.30.ipv4.supernova.orange.pl (79.184.237.30) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.341) id af15a1c3c8096ed7; Thu, 27 Feb 2020 23:25:19 +0100 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , "Rafael J. Wysocki" , Daniel Drake Subject: [PATCH 3/6] ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers() Date: Thu, 27 Feb 2020 23:22:33 +0100 Message-ID: <3205130.aMxiE8xfpn@kreacher> In-Reply-To: <2094703.CetWLLyMuz@kreacher> References: <2094703.CetWLLyMuz@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 --- 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