From nobody Thu Oct 9 04:57:26 2025 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E78E3284662; Fri, 20 Jun 2025 13:14:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750425266; cv=pass; b=bdnEV+C3u4k2nq/yxhp09iNrazE7wb6kkblvvSHVsP3g5jmUFpaT9D1o7EKCLZ59u906uwD3p72ZFlzS2eDMK60Bgn9eQSyk856c8Eol30niWyuNqoyrPYalul5NrIQaXm+ta2/oVkKWt7gtljNj/o7uRCnZ2HKVxcEymSyatXs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750425266; c=relaxed/simple; bh=H5R8o0kXd66u4+i/qXbUVwWj9FSg3AdZtj4azxMfffE=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JyfuAvdZGhqSGkwpaAhRwdBKqGb5/i37S8ppsnRlydUHdnDNCUTLcKmI0rzLHQsiSEmqAklrT64+R3ZxNWEA3PLvqHYIaNXX/ruZCIyXraYuztuQxL+WRVoPZ4myJACIP3CYc10SV2H1CCxd0wUy81uRuJNaFadJ0Me5Xj1KR8A= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty; spf=pass smtp.mailfrom=linux.beauty; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b=HiLE34Cx; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.beauty Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="HiLE34Cx" ARC-Seal: i=1; a=rsa-sha256; t=1750425204; cv=none; d=zohomail.com; s=zohoarc; b=LtFC76nXKkFcv7Pm+hMID0+38hoRWwyfw9Hkc2V7QGmcf927r2g7WVUOBO+W/OXmvjXGgkFBgtYpFdfTSuK6sGRRo+j9MUbdodofRpSFwX/bMtCO3RC/0AWQCC4MG6AAQinSqEaDTYbo+ty6r1K5/zXAXKPL0/40SFmsWBxjN6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750425204; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ih0cPhQO9yl9dR3mzLUlHo55Ox0dnBul4xmprtM+Rl4=; b=SUQ4ZyVR+J/0ALRomHqjpSmsozz3fAD3oNOrh7wM/LRSllmSgD/31q4sAyf1nROcuDtQYd0y0mrF6kAe6hRkTyjJu6sDJ/f7X8b5v5g5w4PhQTFwaexh+CHNMi4qm5nDApW5NQbqhZB64sx8b3fKfVQwOAGQRorN03eoLbolw6M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1750425204; s=zmail; d=linux.beauty; i=me@linux.beauty; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=ih0cPhQO9yl9dR3mzLUlHo55Ox0dnBul4xmprtM+Rl4=; b=HiLE34CxnUe43B8l8dOl4GSWJyGNGs5wH44+fK9LThUUfOh9NrZw2rY62ovYWVuk 00WAy/0HMmc6a/Z3WZzfVmVl15ZjfK6mwXYVcLSdqbBd+kj4PQ3X2M89mjsOoiVlS/9 75OwVo07G1m4ssYC71GY3kTRHAHy998KB7PWuMn4= Received: by mx.zohomail.com with SMTPS id 1750425202690448.1427826058292; Fri, 20 Jun 2025 06:13:22 -0700 (PDT) From: Li Chen To: Hanjun Guo , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , Liu Wei , Ryan Roberts , Andrew Morton , Jonathan Cameron , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v2 1/2] ACPI: Return -ENODEV from acpi_parse_spcr() when SPCR support is disabled Date: Fri, 20 Jun 2025 21:13:07 +0800 Message-ID: <20250620131309.126555-2-me@linux.beauty> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250620131309.126555-1-me@linux.beauty> References: <20250620131309.126555-1-me@linux.beauty> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Li Chen If CONFIG_ACPI_SPCR_TABLE is disabled, acpi_parse_spcr() currently returns 0, which may incorrectly suggest that SPCR parsing was successful. This patch changes the behavior to return -ENODEV to clearly indicate that SPCR support is not available. This prepares the codebase for future changes that depend on acpi_parse_spcr() failure detection, such as suppressing misleading console messages. Signed-off-by: Li Chen --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index f102c0fe34318..71e692f952905 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1503,7 +1503,7 @@ int acpi_parse_spcr(bool enable_earlycon, bool enable= _console); #else static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_consol= e) { - return 0; + return -ENODEV; } #endif =20 --=20 2.49.0