Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1302740pxu; Sat, 5 Dec 2020 10:46:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0TIqhdVowUAktsnf18IzLhboNLdRPJSNdhfWD6Xxe4SIYjo5NzPvRdY5YByTg5VT3uRrj X-Received: by 2002:a17:906:3c11:: with SMTP id h17mr12226146ejg.20.1607193970282; Sat, 05 Dec 2020 10:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607193970; cv=none; d=google.com; s=arc-20160816; b=zhv/VzgigHDPbd28pPmZGJ2u166pxlRTir3gbomuweis4SWp0BEdqj3s97+VMyfKm2 4EH7lDxsPPM+9bCMVTn+pcVo1FNeAPeQajvnBJYfyll/xeEyh4zNgFG7Z4RQgzqBfowu LGYoQYtGPqejc5px+FPOkOe1piMtyEdupzpPTOfy6rZyxyZ1lRRwSmdQDKQWcPfr3ToM 0IJr0Hdo9ZlLJ7xEJnEFkIgous/IYBEeQ6Oi8oQ6O1Gf65Q5prB4tkp3uy2yj4IhWBIA QKQPyDHezBqlH2D92MMvH/VavpdMVEB0aVPG5gncXa2rikjbrDLcwVyWX7EcEEG6ox1A jLjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=23C9Ul2ghjmtO1BTicHAi1FqcvDYRumYWusDkhObZqk=; b=BKrzs4eDn1iCyo6dQpDLjAMYeTUsPqdllk4AiYhxGlHpJY8i4gyfAn2RLH2/1IYI36 m/U/zQPPIw2lT44+YFuWAI4DXPg91cfnhiNd7RfveJGhq6zlIgP3X5G2UKl7sD+kazjS BBTVydo5y7m1D8vH0ANF4+grH+gdA5xcDEldsAzJ3pMdWQDSb9a9TdYdfPK2D3y2rmo5 n/vY0o7m5bsQ6NqRzWy9YD1SxqHlUXtuu3WVaNI0JDwoyAL2y54u3qy/h9G/4G2SXYK/ adMtihbM7Tk2dLkhkBrYFXhLAyUZ5T8pN20T7d5gPMSMD9FFHgJJX0fjJS6fokGazGTb ugyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SofYyZM3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si3173421edr.468.2020.12.05.10.45.47; Sat, 05 Dec 2020 10:46:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SofYyZM3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726755AbgLESme (ORCPT + 99 others); Sat, 5 Dec 2020 13:42:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgLERic (ORCPT ); Sat, 5 Dec 2020 12:38:32 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 729F6C061A56; Sat, 5 Dec 2020 09:04:17 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id a3so9758957wmb.5; Sat, 05 Dec 2020 09:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=23C9Ul2ghjmtO1BTicHAi1FqcvDYRumYWusDkhObZqk=; b=SofYyZM3PDDtGsOSdR8ACZOXWr+yHRxLaOrG0tQ9V2HpWRJFMmvBlLRSGrNU+5A8dz GABdA9y1HX+Hb194BMIjVHTMcWOEufVzEjHhcI0VcPYgRCAGg58zo5Pa0ncTn6cLAgQ2 Ri6SGX+xXlp0kWxTJEI01L8HOiijbbgD+WjG7hYgYM5MisedAFF6yICCrJtu0mrtTc/4 ajtahggj4oL6hyifC0JdGfS2feFpf9SIRTXcAS7mMzdJwh8h2wE/CF380byb1YEr1fVg mEZ07LGxBnV+mGYzUCHsqXJCymAaRa/Q91mKFP54NAxQFdmS2fjkIFfocMNOeyT7HB7K rdew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=23C9Ul2ghjmtO1BTicHAi1FqcvDYRumYWusDkhObZqk=; b=TABepvFXEZgHKyCwY0QeuT/YOLZAGVKD2q6pys08n8fDGZiea37Cv+rf82G7WJA9/P 5i6xLeoPPBd+Gu9wKbmlFX0Kk8FLZ7jmYWe4VMvuUWR6jO1ElV4PhYrQZ6CmTs0+8Knd GAXh6YnoI2TEeT8bOAPaAHy8xwhWNDVDWTj50HF9edV7ZPBjTqhE57Afzh01pfTRQS0g OdOZV6PwRtol/R1AgT2aR7+oisPEqljugKhKj8i8P+BROfT7k/xrpeb2GeJA4HOUesbd Lb74z2Y81TsSJk82gJWR1okMrERVEDMFdT4A0wy2tgbEO878yUlMJMjliF1vzkkZrjXu QZLA== X-Gm-Message-State: AOAM5334A3/YvwZokxJFdJKu1ILDW0T2g9HB12TCnrX0mNoMGrhyya5q 7+frnRhf2OsbJZYN4YIothrnCHq4l4osHg== X-Received: by 2002:a1c:3902:: with SMTP id g2mr9901700wma.117.1607187855750; Sat, 05 Dec 2020 09:04:15 -0800 (PST) Received: from valhalla.home ([2.31.225.57]) by smtp.gmail.com with ESMTPSA id w17sm8265984wru.82.2020.12.05.09.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2020 09:04:15 -0800 (PST) From: Daniel Scally To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: lenb@kernel.org, mika.westerberg@linux.intel.com, rjw@rjwysocki.net Subject: [PATCH v2] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" Date: Sat, 5 Dec 2020 17:04:03 +0000 Message-Id: <20201205170403.31827-1-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef. Switching this function to AE_CTRL_TERMINATE broke the documented behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in fact, terminate the resource walk because acpi_walk_resource_buffer() ignores it (specifically converting it to AE_OK), referring to that value as "an OK termination by the user function". This means that acpi_dev_get_resources() does not abort processing when the preproc function returns a negative value. Signed-off-by: Daniel Scally --- drivers/acpi/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index ad04824ca3ba..f2f5f1dc7c61 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -541,7 +541,7 @@ static acpi_status acpi_dev_process_resource(struct acpi_resource *ares, ret = c->preproc(ares, c->preproc_data); if (ret < 0) { c->error = ret; - return AE_CTRL_TERMINATE; + return AE_ABORT_METHOD; } else if (ret > 0) { return AE_OK; } -- 2.25.1